19 lines
491 B
Diff
19 lines
491 B
Diff
Description: Avoid crashing with invalid coordinates
|
|
Author: Alexandre Detiste <alexandre.detiste@gmail.com>
|
|
Bug-Debian: https://bugs.debian.org/813674
|
|
|
|
--- a/src/v6display.c
|
|
+++ b/src/v6display.c
|
|
@@ -498,9 +498,9 @@
|
|
fg = ACTWIN.fore;
|
|
if (bg == -2)
|
|
bg = ACTWIN.back;
|
|
- if (fg == -1)
|
|
+ if (fg == -1 || ACTWIN.curx < 0 || ACTWIN.cury < 0)
|
|
fg = DEFAULT_FORE;
|
|
- if (bg == -1)
|
|
+ if (bg == -1 || ACTWIN.curx < 0 || ACTWIN.cury < 0)
|
|
bg = DEFAULT_BACK;
|
|
|
|
if (bg == -3)
|