Mercurial > public > ostc4
diff Discovery/Src/gfx_engine.c @ 699:01f40cb1057e
Cleanup warnings:
The code still contained several warnings which have now been resolved. Big thank you to Thomas :-)
author | Ideenmodellierer |
---|---|
date | Tue, 18 Oct 2022 20:56:19 +0200 |
parents | 2c2b9c6eb089 |
children | 158d612a9f4d |
line wrap: on
line diff
--- a/Discovery/Src/gfx_engine.c Sun Sep 25 21:13:45 2022 +0200 +++ b/Discovery/Src/gfx_engine.c Tue Oct 18 20:56:19 2022 +0200 @@ -3053,7 +3053,7 @@ else pText = 0; } - if((*(char*)pText) & 0x80) + if(0 != pText && ((*(char*)pText) & 0x80)) { backup = pText; @@ -3159,6 +3159,7 @@ ptargetFont = (tFont *)cfg->font; } + decodeUTF8 = *(char*)pText; /* place ASCII char */ if((*(char*)pText == '\005') || (*(char*)pText == '\006')) { Xsum += 45; @@ -3920,15 +3921,15 @@ } if (!found && Font == &FontT54) { - Font = &FontT54Extra; + Font = (tFont *)&FontT54Extra; } else if (!found && (Font == &FontT84 || Font == &FontT84Spaced)) { - Font = &FontT84Extra; + Font = (tFont *)&FontT84Extra; } else if (!found && Font == &FontT105) { - Font = &FontT105Extra; + Font = (tFont *)&FontT105Extra; } return Font; @@ -3951,17 +3952,17 @@ if (Font == &FontT54) { found = 1; - Font = &FontT54Extra; + Font = (tFont *)&FontT54Extra; } else if (Font == &FontT84 || Font == &FontT84Spaced) { found = 1; - Font = &FontT84Extra; + Font = (tFont *)&FontT84Extra; } else if (Font == &FontT105) { found = 1; - Font = &FontT105Extra; + Font = (tFont *)&FontT105Extra; } if (found)