summaryrefslogtreecommitdiff
path: root/mm/2s2h/CustomMessage/CustomMessage.cpp
diff options
context:
space:
mode:
authorEblo <7004497+Eblo@users.noreply.github.com>2025-01-17 17:03:54 -0500
committerGitHub <noreply@github.com>2025-01-17 16:03:54 -0600
commit8b37684d90fe61927e66df847df0263938f3231a (patch)
treeb7c6a7eddf0195110f7b215ca29c1dc77d7fe2b7 /mm/2s2h/CustomMessage/CustomMessage.cpp
parent319b18cabac12c075f3413e2e4691b12d56b6eea (diff)
Cast currentChar before using as index (#181)
Diffstat (limited to 'mm/2s2h/CustomMessage/CustomMessage.cpp')
-rw-r--r--mm/2s2h/CustomMessage/CustomMessage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/2s2h/CustomMessage/CustomMessage.cpp b/mm/2s2h/CustomMessage/CustomMessage.cpp
index b3fcd19e8..3e8992be2 100644
--- a/mm/2s2h/CustomMessage/CustomMessage.cpp
+++ b/mm/2s2h/CustomMessage/CustomMessage.cpp
@@ -52,7 +52,7 @@ void CustomMessage::AddLineBreaks(std::string* msg) {
char currentChar = (*msg)[i];
if ((uint8_t)currentChar >= 0x20 && (uint8_t)currentChar < 0x20 + ARRAY_COUNTU(sNESFontWidths)) {
- currentLineWidth += sNESFontWidths[currentChar - 0x20];
+ currentLineWidth += sNESFontWidths[(uint8_t)currentChar - 0x20];
}
// Increment for existing new liens