Compiler: Fix enum field size was not taken into account when implicitly passed to a function.
Imported from Pawn 3.3.3930. Example: --- enum tag { member[32] } new var[tag]; foo(const string[], size = sizeof(string)) { // size returns 1 before fix, 32, after. } public plugin_init() { foo(var[member]); } ---
This commit is contained in:
@ -2734,7 +2734,7 @@ SC_FUNC symbol *addvariable(const char *name,cell addr,int ident,int vclass,int
|
||||
* this special case.
|
||||
*/
|
||||
assert(vclass!=sGLOBAL || (sym=findglb(name))==NULL || (sym->usage & uDEFINE)==0
|
||||
|| sym->ident==iFUNCTN && sym==curfunc);
|
||||
|| (sym->ident==iFUNCTN && sym==curfunc));
|
||||
|
||||
if (ident==iARRAY || ident==iREFARRAY) {
|
||||
symbol *parent=NULL,*top;
|
||||
|
Reference in New Issue
Block a user