Skip to content

Commit 64fd352

Browse files
committed
Fix infinite loop in createColPolygon (Fixes #4263)
1 parent 2f42d5b commit 64fd352

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Server/mods/deathmatch/logic/luadefs/CLuaColShapeDefs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ int CLuaColShapeDefs::CreateColPolygon(lua_State* luaVM)
292292
std::vector<CVector2D> vecPointList;
293293

294294
CScriptArgReader argStream(luaVM);
295-
for (uint i = 0; i < 4 || argStream.NextIsVector2D(); i++)
295+
for (uint i = 0; !argStream.HasErrors() && (i < 4 || argStream.NextIsVector2D()); i++)
296296
{
297297
CVector2D vecPoint;
298298
argStream.ReadVector2D(vecPoint);

0 commit comments

Comments
 (0)