чување 917f4092379c3123480bc0b8da374333881a2f3c
родитељ 0ea5903b70d2990a3d8786ab92d2388cda101165
Аутор: Страхиња Радић <contact@strahinja.org>
Датум: Sun, 27 Feb 2022 22:15:32 +0100
Fix: unsigned overflow when outputting empty line
Signed-off-by: Страхиња Радић <contact@strahinja.org>
Diffstat:
измењених датотека: 1, додавања: 2(+), брисања: 2(-)
diff --git a/table.c b/table.c
@@ -554,7 +554,7 @@ do_input:
*eol = 0;
}
- if (!*line)
+ if (!*line && lineno != 0)
goto empty_line;
quote = 0;
@@ -657,7 +657,7 @@ empty_line:
u8len = u32_char_to_u8(u8ch, *table_symbols[current_symbol_set][3]);
u8ch[u8len] = 0;
printf("%s", u8ch);
- while (current_table_column < table_columns - 1)
+ while (current_table_column + 1 < table_columns)
{
while (within_column(column_start))
{