Compiler: Fix runtime error in variadic functions that return strings.

Imported from SM-AM: https://github.com/Zeex/pawn/commit/1d1244c2f04845051ef94f5455b18703b59e113f.

"This fixes a bug where returning a string from a variadic function caused
an invalid memory access error during runtime. It seems like they forgot
to update existing string return code for variadic functions."
This commit is contained in:
Arkshine
2014-08-26 09:04:56 +02:00
parent 1866afd80b
commit 17114347d1
3 changed files with 53 additions and 1 deletions
+2
View File
@@ -575,6 +575,7 @@ SC_FUNC void startfunc(char *fname);
SC_FUNC void endfunc(void);
SC_FUNC void alignframe(int numbytes);
SC_FUNC void rvalue(value *lval);
SC_FUNC void dereference(void);
SC_FUNC void address(symbol *ptr,regid reg);
SC_FUNC void store(value *lval);
SC_FUNC void storereg(cell address,regid reg);
@@ -595,6 +596,7 @@ SC_FUNC void ffabort(int reason);
SC_FUNC void ffbounds(cell size);
SC_FUNC void jumplabel(int number);
SC_FUNC void defstorage(void);
SC_FUNC void getfrm(void);
SC_FUNC void modstk(int delta);
SC_FUNC void setstk(cell value);
SC_FUNC void modheap(int delta);