parse(count, FLAG_ITEM, mode);
int cols;
// limit arbitrarily to 100 columns
- if (extractNumber(count, cols) && cols < 100) {
+ if (extractNumber(count, cols) && cols > 0 && cols < 100) {
// resize the table if necessary
size_t first = grid.index(cellrow, cellcol);
for (int i = 1; i < cols; ++i) {