Ticket #3944: readline_fix.patch
File readline_fix.patch, 825 bytes (added by , 16 years ago) |
---|
-
common/file.cpp
469 469 return 0; 470 470 471 471 real_len = fread(ptr2, 1, len, (FILE *)_handle); 472 if (real_len < len ) {472 if (real_len < len && !eof()) { 473 473 _ioFailed = true; 474 474 } 475 475 -
common/stream.cpp
171 171 if (ioFailed() || (len == 0 && eos())) 172 172 return 0; 173 173 174 // If end-of-file occurs and characters have been read, 175 // return them. 176 if (eos()) { 177 *p = 0; 178 return buf; 179 } 180 174 181 // Check for CR or CR/LF 175 182 // * DOS and Windows use CRLF line breaks 176 183 // * Unix and OS X use LF line breaks