// String - Null Terminated Array
case 's':
p = va_arg(args, char*); // Get Argument
+ if( !CheckString(p) ) continue; // Avoid #PFs
printString:
if(!p) p = "(null)";
len = strlen(p);
case 'C': // Non-Null Terminated Character Array
p = va_arg(args, char*);
+ if( !CheckMem(p, minSize) ) continue; // No #PFs please
if(!p) goto printString;
while(minSize--) PUTCH(*p++);
break;
int xOfs = 0;
tGlyph *glyph;
uint32_t ch = 0;
+
+ _SysDebug("Video_DrawText: (X=%i,Y=%i,W=%i,H=%i,Font=%p,Color=%08x,Text='%s')",
+ X, Y, W, H, Font, Color, Text);
// Check the bounds
if(W < 0 || X < 0 || X >= giScreenWidth) return 0;
// Find (or load) the glyph
glyph = _GetGlyph(Font, ch);
- if( glyph )
- continue ; // If not found, just don't render it
+ if( !glyph ) continue ; // If not found, just don't render it
// End render if it will overflow the perscribed range
if( xOfs + glyph->TrueWidth > W )