tbl: fix wrong register count calculation (found by erik)

This commit is contained in:
cinap_lenrek 2013-01-05 16:59:56 +01:00
parent 6172dbd996
commit 4405530e69

View file

@ -20,7 +20,7 @@ char *nregs[] = {
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]);
}