mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Fix compilation of malformed statements using array style notation.
git-svn-id: https://svn.eduke32.com/eduke32@5575 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c4193d933b
commit
806413e887
1 changed files with 13 additions and 15 deletions
|
@ -2038,13 +2038,16 @@ static int32_t C_GetNextValue(int32_t type)
|
|||
return 0; // literal value
|
||||
}
|
||||
|
||||
static int32_t C_GetStructureIndexes(int32_t labelsonly, hashtable_t *table)
|
||||
static int32_t C_GetStructureIndexes(int32_t const labelsonly, hashtable_t const * const table)
|
||||
{
|
||||
while ((*textptr != '['))
|
||||
textptr++;
|
||||
C_SkipComments();
|
||||
|
||||
if (*textptr == '[')
|
||||
textptr++;
|
||||
if (EDUKE32_PREDICT_FALSE(*textptr++ != '['))
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_SYNTAXERROR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
C_SkipComments();
|
||||
|
||||
|
@ -2060,24 +2063,19 @@ static int32_t C_GetStructureIndexes(int32_t labelsonly, hashtable_t *table)
|
|||
g_labelsOnly = 0;
|
||||
}
|
||||
|
||||
// now get name of .xxx
|
||||
while (*textptr != '.')
|
||||
{
|
||||
if (*textptr == 0xa || !*textptr)
|
||||
break;
|
||||
|
||||
textptr++;
|
||||
}
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(*textptr != '.'))
|
||||
C_SkipComments();
|
||||
|
||||
// now get name of .xxx
|
||||
|
||||
if (EDUKE32_PREDICT_FALSE(*textptr++ != '.'))
|
||||
{
|
||||
g_numCompilerErrors++;
|
||||
C_ReportError(ERROR_SYNTAXERROR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
textptr++;
|
||||
|
||||
if (!table)
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue