1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[dump] Fix for hr. Refs #106

This commit is contained in:
Witold Filipczyk 2021-03-17 14:56:12 +01:00
parent eecb907585
commit 62a08231ca
2 changed files with 7 additions and 4 deletions

View File

@ -129,9 +129,12 @@ DUMP_FUNCTION_SPECIALIZED(struct document *document, struct dump_output *out)
}
#endif /* DUMP_COLOR_MODE_TRUE */
if ((attr & SCREEN_ATTR_FRAME)
&& c >= FRAME_CHARS_BEGIN && c < FRAME_CHARS_END)
if (attr & SCREEN_ATTR_FRAME) {
c = (unsigned char)c;
if (c >= FRAME_CHARS_BEGIN && c < FRAME_CHARS_END) {
c = out->frame[c - FRAME_CHARS_BEGIN];
}
}
#ifdef DUMP_CHARSET_UTF8
if (!isscreensafe_ucs(c)) c = ' ';

View File

@ -78,7 +78,7 @@ struct dump_output {
#ifdef CONFIG_UTF8
unicode_val_T frame[FRAME_CHARS_END - FRAME_CHARS_BEGIN];
#else
char frame[FRAME_CHARS_END - FRAME_CHARS_BEGIN];
unsigned char frame[FRAME_CHARS_END - FRAME_CHARS_BEGIN];
#endif
/** Bytes waiting to be flushed. */