* view.c (display): Fixed bug that displayed an empty file in

hexview mode with growing buffers.
This commit is contained in:
Roland Illig 2004-10-22 08:18:55 +00:00
parent 10256f6e35
commit 80aa91ede7
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,8 @@
* regex.c: Fix the C preprocessor feature tests. They produced
warnings before.
* view.c (display): Fixed bug that displayed an empty file in
hexview mode with growing buffers.
2004-09-25 Pavel Shirshov <me@pavelsh.pp.ru>

View File

@ -941,7 +941,8 @@ display (WView *view)
/* Start of text column */
int text_start = width - view->bytes_per_line - 1 + frame_shift;
for (; row < height && from < view->last_byte; row++) {
for (; (void) get_byte (view, from + view->bytes_per_line),
row < height && from < view->last_byte; row++) {
/* Print the hex offset */
attrset (MARKED_COLOR);
g_snprintf (hex_buff, sizeof (hex_buff), "%08X",