From d9ad79a3b8eaa72c4e4f179dc289201867bf9251 Mon Sep 17 00:00:00 2001 From: luciusDXL Date: Sat, 28 Sep 2024 00:59:08 -0700 Subject: [PATCH] Fix INF infinite loading loop in lasthope. --- TheForceEngine/TFE_Jedi/InfSystem/infSystem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TheForceEngine/TFE_Jedi/InfSystem/infSystem.cpp b/TheForceEngine/TFE_Jedi/InfSystem/infSystem.cpp index 98737363f..ffea9f5c9 100644 --- a/TheForceEngine/TFE_Jedi/InfSystem/infSystem.cpp +++ b/TheForceEngine/TFE_Jedi/InfSystem/infSystem.cpp @@ -803,6 +803,7 @@ namespace TFE_Jedi break; default: // Invalid type. + parser.readLine(bufferPos); return false; }; // index is mapped to a type internally. @@ -853,6 +854,7 @@ namespace TFE_Jedi break; default: // Invalid type. + parser.readLine(bufferPos); return false; } @@ -1303,7 +1305,7 @@ namespace TFE_Jedi // Then loop through all of the items and parse their classes. s32 wallNum = 0; - for (s32 i = 0; i < itemCount; i++) + for (s32 i = 0; i < itemCount && line; i++) { line = parser.readLine(bufferPos); if (!line)