ref: 0b27583c5cdfecd020cdaf7dcce140e186c3b4ff
parent: 47434df8f9770069fd4f0c01fe18cab06999663c
author: Jonathan Dowland <[email protected]>
date: Wed Jul 22 03:02:41 EDT 2015
Add constraint check to CellOverflowedSize Fixes #585.
--- a/textscreen/txt_table.c
+++ b/textscreen/txt_table.c
@@ -99,7 +99,14 @@
// Every overflow cell must point to either (x, y) or another
// overflow cell. This means the first in every row must be
// txt_table_overflow_down.
+
+ if (y1 * table->columns + x >= table->num_widgets)
+ {
+ break;
+ }
+
widget = table->widgets[y1 * table->columns + x];
+
if (y1 != y && widget != &txt_table_overflow_down)
{
break;