Fix crash with malformed arguments (bug 6176).
This commit is contained in:
parent
c47cfa6fa8
commit
21d3a7f93e
@ -6652,6 +6652,10 @@ static void statement(int *lastindent,int allow_decl)
|
||||
}
|
||||
|
||||
if (is_decl) {
|
||||
if (!allow_decl) {
|
||||
error(3);
|
||||
return;
|
||||
}
|
||||
lexpush();
|
||||
autozero = TRUE;
|
||||
lastst = tNEW;
|
||||
|
4
sourcepawn/compiler/tests/fail-missing-arg-comma.sp
Normal file
4
sourcepawn/compiler/tests/fail-missing-arg-comma.sp
Normal file
@ -0,0 +1,4 @@
|
||||
stock void Function( float array1[ 3 ] float array2[ 3 ] )
|
||||
{
|
||||
|
||||
}
|
1
sourcepawn/compiler/tests/fail-missing-arg-comma.txt
Normal file
1
sourcepawn/compiler/tests/fail-missing-arg-comma.txt
Normal file
@ -0,0 +1 @@
|
||||
(1) : error 001: expected token: ")", but found "-identifier-"
|
Loading…
Reference in New Issue
Block a user