Fix issue where a useless error would be printed to the log and bad memory reads could occur when compiling a CON script with an invalid structure member passed as gamevar structure access shortcut shorthand

git-svn-id: https://svn.eduke32.com/eduke32@7323 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-01-30 09:36:52 +00:00
parent 1245799e6b
commit c4753af497

View file

@ -1500,8 +1500,10 @@ static void C_GetNextVarType(int32_t type)
case STRUCT_ACTORVAR: case STRUCT_ACTORVAR:
case STRUCT_PLAYERVAR: labelNum = GetDefID(LAST_LABEL); break; case STRUCT_PLAYERVAR: labelNum = GetDefID(LAST_LABEL); break;
}
default: if (labelNum == -1)
{
g_errorCnt++; g_errorCnt++;
C_ReportError(ERROR_NOTAMEMBER); C_ReportError(ERROR_NOTAMEMBER);
return; return;