diff options
| author | Eblo <7004497+Eblo@users.noreply.github.com> | 2025-01-17 17:03:54 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-17 16:03:54 -0600 |
| commit | 8b37684d90fe61927e66df847df0263938f3231a (patch) | |
| tree | b7c6a7eddf0195110f7b215ca29c1dc77d7fe2b7 /mm/2s2h/CustomMessage/CustomMessage.cpp | |
| parent | 319b18cabac12c075f3413e2e4691b12d56b6eea (diff) | |
Cast currentChar before using as index (#181)
Diffstat (limited to 'mm/2s2h/CustomMessage/CustomMessage.cpp')
| -rw-r--r-- | mm/2s2h/CustomMessage/CustomMessage.cpp | 2 |
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 |
