SA-MP Forums Archive
CallLocalFunction() crashes with empty string - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Bug Reports (https://sampforum.blast.hk/forumdisplay.php?fid=20)
+--- Thread: CallLocalFunction() crashes with empty string (/showthread.php?tid=180777)



CallLocalFunction() crashes with empty string - ZecKo - 02.10.2010

Hi, I saw now empty strings don't crash the server anymore with printf and many others function, but they still crash with some, like CallLocalFunction().

Code:
CallLocalFunction(strFunction, "is", playerid, params);
Will crash the server if params is an empty string.


AW: CallLocalFunction() crashes with empty string - Meta - 02.10.2010

It depends on the function given in strFunction.
For example it is "Foo" and Foo does anything with a string.
Maybe there's a function in Foo that crashes with empty strings ...


Re: CallLocalFunction() crashes with empty string - ev0lution - 03.10.2010

That's correct. CallLocalFunction and CallRemoteFunction crash when you pass an empty string.
I suggest passing "\1" and using isnull in the called function to check if it was meant to be empty.


Re: CallLocalFunction() crashes with empty string - ZecKo - 03.10.2010

Meta:
public cmd_kill(playerid, params[])
It doesn't deal with the string, the problem come from CallLocalFunction.

ev0lutionnn:
Yeah I already use similar ('%'), thanks.


Re: CallLocalFunction() crashes with empty string - nemesis- - 12.10.2010

What crash message are you getting? Are you getting a server segfault? Linux or windows?


Re : CallLocalFunction() crashes with empty string - ZecKo - 13.10.2010

In crashinfo.txt? I don't know what is a server segfault. It's on Windows.