fix checks in *_num() functions: only when/where necessary

This commit is contained in:
marschap
2006-04-11 20:57:15 +00:00
parent 66e38659cb
commit 65a473f2b7
12 changed files with 34 additions and 27 deletions
+4 -1
View File
@@ -544,8 +544,11 @@ glk_num(Driver *drvthis, int x, int num)
debug(RPT_DEBUG, "glk_num(%d, %d)", x, num);
if ((num < 0) || (num > 10))
return;
if ((x > 0) && (x <= p->width))
p->framebuf[x-1] = num + '0';
p->framebuf[x-1] = (num >= 10) ? ':' : (num + '0');
}
//////////////////////////////////////////////////////////////////////