Fix bug in variadic argument parsing.
This commit is contained in:
		
							parent
							
								
									57303f4310
								
							
						
					
					
						commit
						2a99eecdb6
					
				| @ -3395,7 +3395,7 @@ int parse_decl(declinfo_t *decl, int flags) | |||||||
|   decl->type.size = 1; |   decl->type.size = 1; | ||||||
| 
 | 
 | ||||||
|   // Match early varargs as old decl.
 |   // Match early varargs as old decl.
 | ||||||
|   if (matchtoken(tELLIPS)) |   if (lexpeek(tELLIPS)) | ||||||
|     return parse_old_decl(decl, flags); |     return parse_old_decl(decl, flags); | ||||||
| 
 | 
 | ||||||
|   // Must attempt to match const first, since it's a common prefix.
 |   // 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