Skip to content

Commit b000df4

Browse files
committed
Clarity
1 parent d2ca4d0 commit b000df4

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

common/include/golfileparser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class GolFileParser : public GolFile {
8181
LegoFloat m_unk0x40; // 0x40
8282
LegoChar m_unk0x44[0x84 - 0x44]; // 0x44
8383
undefined m_unk0x84[0xa4 - 0x84]; // 0x84
84-
LegoChar m_unk0xa4[0x1a4 - 0xa4]; // 0xa4
84+
LegoChar m_unk0xa4[256]; // 0xa4
8585
LegoChar* m_filePath; // 0x1a4
8686
LegoChar m_unk0x1a8[0x1e8 - 0x1a8]; // 0x1a8
8787
LegoChar m_suffix[5]; // 0x1a8

common/src/golfileparser.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,11 @@ void GolFileParser::FUN_10032580(LegoS32 p_code)
9090
return;
9191
}
9292

93-
int totalLen = ::strlen(ErrorCodeToString(p_code)) + ::strlen(m_filePath) + ::strlen(g_ioErrorOccurredFormatStr);
93+
LegoS32 totalLen =
94+
::strlen(ErrorCodeToString(p_code)) + ::strlen(m_filePath) + ::strlen(g_ioErrorOccurredFormatStr);
9495
m_unk0xa4[0] = '\0';
9596

96-
if (totalLen < 255) {
97+
if (totalLen < (LegoS32) sizeOfArray(m_unk0xa4) - 1) {
9798
::sprintf(m_unk0xa4, g_ioErrorOccurredFormatStr, m_filePath);
9899
}
99100

0 commit comments

Comments
 (0)