fixed a compiler bug with declaring natives having parameters with no arrays and returning strings
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40196
This commit is contained in:
parent
73e1d4b9cc
commit
f305cafe8c
@ -2269,7 +2269,7 @@ static int declloc(int fstatic)
|
|||||||
} while (matchtoken('['));
|
} while (matchtoken('['));
|
||||||
if (all_constant) {
|
if (all_constant) {
|
||||||
/* Change the last dimension to be based on chars instead if we have a string */
|
/* Change the last dimension to be based on chars instead if we have a string */
|
||||||
if (tag == pc_tag_string && dim[numdim-1])
|
if (tag == pc_tag_string && numdim && dim[numdim-1])
|
||||||
dim[numdim-1] = (dim[numdim-1] + sizeof(cell)-1) / sizeof(cell);
|
dim[numdim-1] = (dim[numdim-1] + sizeof(cell)-1) / sizeof(cell);
|
||||||
/* Scrap the code generated */
|
/* Scrap the code generated */
|
||||||
ident = iARRAY;
|
ident = iARRAY;
|
||||||
@ -3736,7 +3736,7 @@ static void funcstub(int fnative)
|
|||||||
dim[numdim++]=(int)size;
|
dim[numdim++]=(int)size;
|
||||||
} /* while */
|
} /* while */
|
||||||
|
|
||||||
if (tag == pc_tag_string && dim[numdim-1])
|
if (tag == pc_tag_string && numdim && dim[numdim-1])
|
||||||
dim[numdim-1] = (size + sizeof(cell)-1) / sizeof(cell);
|
dim[numdim-1] = (size + sizeof(cell)-1) / sizeof(cell);
|
||||||
|
|
||||||
tok=lex(&val,&str);
|
tok=lex(&val,&str);
|
||||||
|
Loading…
Reference in New Issue
Block a user