diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index 67084c39..52b7ee05 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -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. diff --git a/sourcepawn/compiler/tests/ok-varargs.sp b/sourcepawn/compiler/tests/ok-varargs.sp new file mode 100644 index 00000000..8361c066 --- /dev/null +++ b/sourcepawn/compiler/tests/ok-varargs.sp @@ -0,0 +1,7 @@ +stock MyFormat( const String:formatString[], ... ) +{ +} + +public main() +{ +}