diff options
Diffstat (limited to 'src/fileio.c')
| -rw-r--r-- | src/fileio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c index 20b7079700e..b152f0a74e0 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3870,7 +3870,7 @@ actually used.") | |||
| 3870 | report_file_error ("Setting file position", | 3870 | report_file_error ("Setting file position", |
| 3871 | Fcons (orig_filename, Qnil)); | 3871 | Fcons (orig_filename, Qnil)); |
| 3872 | 3872 | ||
| 3873 | total_read = 0; | 3873 | total_read = nread = 0; |
| 3874 | while (total_read < trial) | 3874 | while (total_read < trial) |
| 3875 | { | 3875 | { |
| 3876 | nread = emacs_read (fd, buffer + total_read, trial - total_read); | 3876 | nread = emacs_read (fd, buffer + total_read, trial - total_read); |
| @@ -3905,6 +3905,9 @@ actually used.") | |||
| 3905 | giveup_match_end = 1; | 3905 | giveup_match_end = 1; |
| 3906 | break; | 3906 | break; |
| 3907 | } | 3907 | } |
| 3908 | |||
| 3909 | if (nread == 0) | ||
| 3910 | break; | ||
| 3908 | } | 3911 | } |
| 3909 | immediate_quit = 0; | 3912 | immediate_quit = 0; |
| 3910 | 3913 | ||