diff options
| author | Jcw87 <Jcw87@users.noreply.github.com> | 2026-01-05 04:07:04 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-05 04:07:04 -0800 |
| commit | 5b987084eac71e044ace3ebe21f62d5410b23e62 (patch) | |
| tree | 5e11e8c9054c7cfde2220fc08f96ea4d6781e83b /src/JSystem/JUtility/JUTFont.cpp | |
| parent | e15ba03caac09f55e3055cbd2bf6d214e9d94372 (diff) | |
JUtility debug (#3020)
Diffstat (limited to 'src/JSystem/JUtility/JUTFont.cpp')
| -rw-r--r-- | src/JSystem/JUtility/JUTFont.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/JSystem/JUtility/JUTFont.cpp b/src/JSystem/JUtility/JUTFont.cpp index eedd0d8e85..90976b3f76 100644 --- a/src/JSystem/JUtility/JUTFont.cpp +++ b/src/JSystem/JUtility/JUTFont.cpp @@ -12,9 +12,8 @@ JUTFont::JUTFont() : mColor1(), mColor2(), mColor3(), mColor4() { } void JUTFont::initialize_state() { - setCharColor(JUtility::TColor()); - mFixed = false; - mFixedWidth = 0; + setCharColor(-1); + setFixedWidth(false, 0); mValid = false; } @@ -36,14 +35,15 @@ f32 JUTFont::drawString_size_scale(f32 a1, f32 a2, f32 a3, f32 a4, const char* s bool a7) { f32 temp = a1; - for (; usz > 0; usz--, str++) { + for (; usz > 0; --usz, ++str) { u32 c = *(u8*)str; u32 b = c; if (isLeadByte(b)) { + JUT_ASSERT(114, usz >= 2); + usz--; str++; b <<= 8; b |= *(u8*)str; - usz--; } a1 += drawChar_scale(a1, a2, a3, a4, b, a7); |
