git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added sanity checking to kernel vnsprintf
[tpg/acess2.git]
/
Usermode
/
Applications
/
axwin2_src
/
WM
/
video_text.c
diff --git
a/Usermode/Applications/axwin2_src/WM/video_text.c
b/Usermode/Applications/axwin2_src/WM/video_text.c
index
897c411
..
87a72f0
100644
(file)
--- a/
Usermode/Applications/axwin2_src/WM/video_text.c
+++ b/
Usermode/Applications/axwin2_src/WM/video_text.c
@@
-62,6
+62,9
@@
int Video_DrawText(short X, short Y, short W, short H, tFont *Font, uint32_t Col
int xOfs = 0;
tGlyph *glyph;
uint32_t ch = 0;
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;
// Check the bounds
if(W < 0 || X < 0 || X >= giScreenWidth) return 0;
@@
-80,8
+83,7
@@
int Video_DrawText(short X, short Y, short W, short H, tFont *Font, uint32_t Col
// Find (or load) the glyph
glyph = _GetGlyph(Font, ch);
// 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 )
// End render if it will overflow the perscribed range
if( xOfs + glyph->TrueWidth > W )
UCC
git Repository :: git.ucc.asn.au