aboutsummaryrefslogtreecommitdiff
path: root/pattern.c
diff options
context:
space:
mode:
Diffstat (limited to 'pattern.c')
-rw-r--r--pattern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pattern.c b/pattern.c
index ca71fba..e7b99b3 100644
--- a/pattern.c
+++ b/pattern.c
@@ -330,7 +330,7 @@ int compute_rowdata(int *ret, unsigned char *start, int len, int step)
i += runlen;
}
- if (start[i*step] == GRID_UNKNOWN)
+ if (i < len && start[i*step] == GRID_UNKNOWN)
return -1;
}