Merge pull request #105 from alliedmodders/fix-varargs
Fix bug in variadic argument parsing. (bug 6195)
This commit is contained in:
commit
b6d8cb9fcf
@ -3395,7 +3395,7 @@ int parse_decl(declinfo_t *decl, int flags)
|
||||
decl->type.size = 1;
|
||||
|
||||
// Match early varargs as old decl.
|
||||
if (matchtoken(tELLIPS))
|
||||
if (lexpeek(tELLIPS))
|
||||
return parse_old_decl(decl, flags);
|
||||
|
||||
// Must attempt to match const first, since it's a common prefix.
|
||||
|
7
sourcepawn/compiler/tests/ok-varargs.sp
Normal file
7
sourcepawn/compiler/tests/ok-varargs.sp
Normal file
@ -0,0 +1,7 @@
|
||||
stock MyFormat( const String:formatString[], ... )
|
||||
{
|
||||
}
|
||||
|
||||
public main()
|
||||
{
|
||||
}
|
Loading…
Reference in New Issue
Block a user