Skip to content

Commit 5c163b6

Browse files
committed
[Endings] Fix extra font array sizes
These errors actually cause the game to crash in optimized Visual Studio 2022 Release builds. Of all variables it could have placed after `pFontInfo`, it chose `EnemyNow`, whose corruption caused enemy_move() to parse an unallocated ECL buffer. Really shows how theoretical bugs like these can turn into actual bugs just by updating your compiler. Who knows how many more of these are lurking in this codebase? Completes P0217, funded by Arandui.
1 parent 5b0e190 commit 5c163b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GIAN07/ENDING.CPP

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ EndingStTask EStfTask;
4545
EndingText EText;
4646

4747
// フォント情報格納用ね //
48-
ExtraFontInfo *pFontInfo[6];
48+
ExtraFontInfo *pFontInfo[7];
4949
ExtraFontInfo *pMember[7];
5050

5151
// フラッシュの状態 //
@@ -143,7 +143,7 @@ FVOID EndingCleanup()
143143
{
144144
int i;
145145

146-
for(i=0; i<6; i++){
146+
for(i=0; i<7; i++){
147147
DeleteExtraFont(pFontInfo[i]);
148148
}
149149

0 commit comments

Comments
 (0)