detect infinite recursion in redirects

This commit is contained in:
Chris Danford
2005-12-08 08:24:30 +00:00
parent 51fc84e2d2
commit 38ffd83205
+4
View File
@@ -235,8 +235,12 @@ try_again:
RageException::Throw( message );
}
int iLevel = 0;
while( GetExtension(sPath) == "redir" )
{
iLevel++;
ASSERT_M( iLevel < 100, ssprintf("Infinite recursion while looking up %s - %s", sButtonName.c_str(), sElement.c_str()) );
CString sNewFileName;
GetFileContents( sPath, sNewFileName, true );
CString sRealPath;