summaryrefslogtreecommitdiff
path: root/src/text.c
diff options
context:
space:
mode:
authorDiegoisawesome <Diegoisawesome@users.noreply.github.com>2018-12-22 16:12:27 -0600
committerGitHub <noreply@github.com>2018-12-22 16:12:27 -0600
commitebbe826133661d3faabc17f9167fa565b405514a (patch)
tree52687e79258567b4d88c184b6692e035d0ff3e14 /src/text.c
parent87fd6b8dc21b37b656f16e3f11832c6951328750 (diff)
parentc805bab48324f946845e1f81002035e4bdb07e62 (diff)
Merge pull request #437 from DizzyEggg/storage
Pokemon Storage System
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/text.c b/src/text.c
index 07c15596e..39e412633 100644
--- a/src/text.c
+++ b/src/text.c
@@ -1858,7 +1858,7 @@ u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32)
return NULL;
}
-u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
+s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
{
bool8 isJapanese;
int minGlyphWidth;
@@ -1868,7 +1868,7 @@ u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
u32 lineWidth;
const u8 *bufferPointer;
int glyphWidth;
- u32 width;
+ s32 width;
isJapanese = 0;
minGlyphWidth = 0;
@@ -2028,7 +2028,8 @@ u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
if (lineWidth > width)
return lineWidth;
- return width;
+ else
+ return width;
}
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str)