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
+5 -2
View File
@@ -520,12 +520,15 @@ svgalib_drv_chr (Driver *drvthis, int x, int y, char c)
MODULE_EXPORT void
svgalib_drv_num (Driver *drvthis, int x, int num)
{
char c;
int y, dx;
char c;
debug(RPT_DEBUG, "%s(%p, %d, %d)", __FUNCTION__, drvthis, x, num);
c = '0' + num;
if ((num < 0) || (num > 10))
return;
c = (num >= 10) ? ':' : ('0' + num);
for (y = 1; y < 5; y++)
for (dx = 0; dx < 3; dx++)