ref: 4405530e69645577e1cd7848cc38a4464989ac32
parent: 6172dbd996e16dbc386c713afbab20f786e29729
author: cinap_lenrek <[email protected]>
date: Sat Jan 5 11:59:56 EST 2013
tbl: fix wrong register count calculation (found by erik)
--- a/sys/src/cmd/tbl/tr.c
+++ b/sys/src/cmd/tbl/tr.c
@@ -20,7 +20,7 @@
char *
reg(int col, int place)
{
- if (sizeof(nregs) < 2 * 3 * qcol)
+ if (nelem(nregs)-1 < 3 * qcol)
error("Too many columns for registers");
return (nregs[qcol*place+col]);
}