Don't crash if a component use NULL as error message argument. Replace it by a void string.

[INTERPRETER]
* BUG: Don't crash if a component use NULL as error message argument. Replace it by a void string.
This commit is contained in:
gambas 2019-02-06 23:23:18 +01:00
parent 8d04122c84
commit c0eab6b4c4

View file

@ -313,7 +313,10 @@ static int get_message_length(const char *pattern, char *arg[], int narg)
len = strlen(pattern) + narg;
for (i = 0; i < narg; i++)
len += strlen(arg[i]);
{
if (arg[i])
len += strlen(arg[i]);
}
if (!EXEC_debug)
len -= narg * 3;