diff options
| -rw-r--r-- | src/lread.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lread.c b/src/lread.c index 7f226074f09..9c8adf889c0 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2787,22 +2787,14 @@ read_internal_start (Lisp_Object stream, Lisp_Object start, Lisp_Object end, | |||
| 2787 | read_objects_completed | 2787 | read_objects_completed |
| 2788 | = make_hash_table (&hashtest_eq, DEFAULT_HASH_SIZE, Weak_None); | 2788 | = make_hash_table (&hashtest_eq, DEFAULT_HASH_SIZE, Weak_None); |
| 2789 | 2789 | ||
| 2790 | if (STRINGP (stream) | 2790 | if (STRINGP (stream)) |
| 2791 | || ((CONSP (stream) && STRINGP (XCAR (stream))))) | ||
| 2792 | { | 2791 | { |
| 2793 | ptrdiff_t startval, endval; | 2792 | ptrdiff_t startval, endval; |
| 2794 | Lisp_Object string; | 2793 | validate_subarray (stream, start, end, SCHARS (stream), |
| 2795 | |||
| 2796 | if (STRINGP (stream)) | ||
| 2797 | string = stream; | ||
| 2798 | else | ||
| 2799 | string = XCAR (stream); | ||
| 2800 | |||
| 2801 | validate_subarray (string, start, end, SCHARS (string), | ||
| 2802 | &startval, &endval); | 2794 | &startval, &endval); |
| 2803 | 2795 | ||
| 2804 | read_from_string_index = startval; | 2796 | read_from_string_index = startval; |
| 2805 | read_from_string_index_byte = string_char_to_byte (string, startval); | 2797 | read_from_string_index_byte = string_char_to_byte (stream, startval); |
| 2806 | read_from_string_limit = endval; | 2798 | read_from_string_limit = endval; |
| 2807 | } | 2799 | } |
| 2808 | 2800 | ||