Skip to content

Commit 4dce478

Browse files
committed
max_footer_cursor_col should be great or equal than zero every time
1 parent 8581dce commit 4dce478

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/pspg.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5092,7 +5092,12 @@ main(int argc, char *argv[])
50925092

50935093
if (_is_footer_cursor)
50945094
{
5095-
int max_footer_cursor_col = desc.footer_char_size - scrdesc.main_maxx;
5095+
int max_footer_cursor_col;
5096+
5097+
if (desc.footer_char_size > scrdesc.main_maxx)
5098+
max_footer_cursor_col = desc.footer_char_size - scrdesc.main_maxx;
5099+
else
5100+
max_footer_cursor_col = 0;
50965101

50975102
if (footer_cursor_col + 1 >= max_footer_cursor_col && scrdesc.rows_rows >= 0)
50985103
{

0 commit comments

Comments
 (0)