[INTERPRETER]
* BUG: L'API GB.ReturnNewString() doit pouvoir retourner une chaîne vide. Dans ce cas elle le transforme en un GB.ReturnNull(). git-svn-id: svn://localhost/gambas/trunk@2960 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
2215ca1b08
commit
48f6a6a309
1 changed files with 7 additions and 2 deletions
|
@ -1236,8 +1236,13 @@ void GB_ReturnNewString(const char *src, int len)
|
|||
|
||||
if (len <= 0)
|
||||
{
|
||||
fprintf(stderr, "warning: now use GB.ReturnNewZeroString() instead of GB.ReturnNewString()\n");
|
||||
BREAKPOINT();
|
||||
if (*src)
|
||||
{
|
||||
fprintf(stderr, "warning: now use GB.ReturnNewZeroString() instead of GB.ReturnNewString()\n");
|
||||
BREAKPOINT();
|
||||
}
|
||||
GB_ReturnNull();
|
||||
return;
|
||||
}
|
||||
|
||||
STRING_new_temp(&str, src, len);
|
||||
|
|
Loading…
Reference in a new issue