[GB.NET.CURL]

* BUG: Don't crash if FtpClient.Exec() gets a void array as commands array.


git-svn-id: svn://localhost/gambas/trunk@5551 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2013-02-16 17:08:10 +00:00
parent 7752fa8cfd
commit 3a4caa35ab
2 changed files with 10 additions and 12 deletions

View file

@ -1,9 +1,9 @@
# Gambas Project File 3.0
# Compiled with Gambas 3.1.0
# Compiled with Gambas 3.4.0
Title=MySQL Example
Startup=modMain
Icon=icons/16/Admin.png
Version=3.0.90
Version=3.4.0
VersionFile=1
Component=gb.image
Component=gb.qt4
@ -22,10 +22,5 @@ SourcePath=/media
Maintainer=David Villalobos Cambronero
Address=david_villalobos_c@yahoo.com
License=General Public License
UseRelease=1
Packager=1
Systems=autotools
Menus=
Categories=
Groups=
ExtraDependencies=
ExtraFiles=

View file

@ -170,11 +170,14 @@ static int ftp_exec(void *_object, int what, GB_ARRAY commands)
THIS_FTP->commands = commands;
GB.Ref(commands);
if (GB.Array.Count(commands))
{
list = NULL;
for (i = 0; i < GB.Array.Count(commands); i++)
list = curl_slist_append(list, *(char **)GB.Array.Get(commands, i));
curl_easy_setopt(THIS_CURL, CURLOPT_QUOTE, list);
}
}
break;
}