diff --git a/src/viewer/dump/dump.c b/src/viewer/dump/dump.c index e88115fbf..9b38ab2de 100644 --- a/src/viewer/dump/dump.c +++ b/src/viewer/dump/dump.c @@ -324,11 +324,11 @@ add_document_to_string(struct string *string, struct document *document) if_assert_failed return NULL; for (y = 0; y < document->height; y++) { - struct screen_char *pos = document->data[y].chars; int white = 0; int x; for (x = 0; x < document->data[y].length; x++) { + struct screen_char *pos = &document->data[y].chars[x]; unsigned char data = pos->data; unsigned int frame = (pos->attr & SCREEN_ATTR_FRAME);