mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-01 00:54:24 +03:00
* view.c (view_move_forward2): Early return if get_byte() returns
-1.
This commit is contained in:
parent
1c367fbab4
commit
2842c33f11
@ -6,6 +6,8 @@
|
||||
Replaced 0 literals with FALSE.
|
||||
* view.c (view_free_growing_buffer): Renamed to
|
||||
view_growbuf_free(). Simplified the code.
|
||||
* view.c (view_move_forward2): Early return if get_byte() returns
|
||||
-1.
|
||||
|
||||
2005-04-18 Roland Illig <roland.illig@gmx.de>
|
||||
|
||||
|
@ -1225,8 +1225,9 @@ view_move_forward2 (WView *view, offset_type current, int lines, offset_type upt
|
||||
if (lines != -1 && line >= lines)
|
||||
return p;
|
||||
|
||||
/* FIXME: what if get_byte() returns -1? */
|
||||
c = get_byte (view, p);
|
||||
/* end of file or reading error -- stop going forward */
|
||||
if ((c = get_byte (view, p)) == -1)
|
||||
return p;
|
||||
|
||||
if (view->text_wrap_mode) {
|
||||
if (c == '\r')
|
||||
|
Loading…
Reference in New Issue
Block a user