diff options
Diffstat (limited to 'src/bytecode.c')
| -rw-r--r-- | src/bytecode.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index ff9a36e54b7..bfbb3b847e0 100644 --- a/src/bytecode.c +++ b/src/bytecode.c | |||
| @@ -401,12 +401,12 @@ If the third argument is incorrect, Emacs may crash.") | |||
| 401 | #endif | 401 | #endif |
| 402 | int op; | 402 | int op; |
| 403 | /* Lisp_Object v1, v2; */ | 403 | /* Lisp_Object v1, v2; */ |
| 404 | Lisp_Object *vectorp = XVECTOR (vector)->contents; | 404 | Lisp_Object *vectorp; |
| 405 | #ifdef BYTE_CODE_SAFE | 405 | #ifdef BYTE_CODE_SAFE |
| 406 | int const_length = XVECTOR (vector)->size; | 406 | int const_length = XVECTOR (vector)->size; |
| 407 | Lisp_Object *stacke; | 407 | Lisp_Object *stacke; |
| 408 | #endif | 408 | #endif |
| 409 | int bytestr_length = STRING_BYTES (XSTRING (bytestr)); | 409 | int bytestr_length; |
| 410 | struct byte_stack stack; | 410 | struct byte_stack stack; |
| 411 | Lisp_Object *top; | 411 | Lisp_Object *top; |
| 412 | Lisp_Object result; | 412 | Lisp_Object result; |
| @@ -416,6 +416,17 @@ If the third argument is incorrect, Emacs may crash.") | |||
| 416 | vector = wrong_type_argument (Qvectorp, vector); | 416 | vector = wrong_type_argument (Qvectorp, vector); |
| 417 | CHECK_NUMBER (maxdepth, 2); | 417 | CHECK_NUMBER (maxdepth, 2); |
| 418 | 418 | ||
| 419 | if (STRING_MULTIBYTE (bytestr)) | ||
| 420 | /* BYTESTR must have been produced by Emacs 20.2 or the earlier | ||
| 421 | because they produced a raw 8-bit string for byte-code and now | ||
| 422 | such a byte-code string is loaded as multibyte while raw 8-bit | ||
| 423 | characters converted to multibyte form. Thus, now we must | ||
| 424 | convert them back to the original unibyte form. */ | ||
| 425 | bytestr = Fstring_as_unibyte (bytestr); | ||
| 426 | |||
| 427 | bytestr_length = STRING_BYTES (XSTRING (bytestr)); | ||
| 428 | vectorp = XVECTOR (vector)->contents; | ||
| 429 | |||
| 419 | stack.byte_string = bytestr; | 430 | stack.byte_string = bytestr; |
| 420 | stack.pc = stack.byte_string_start = XSTRING (bytestr)->data; | 431 | stack.pc = stack.byte_string_start = XSTRING (bytestr)->data; |
| 421 | stack.constants = vector; | 432 | stack.constants = vector; |