diff options
author | ediejohnny <ediejohnny@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2013-02-04 21:57:52 +0000 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-04-11 15:28:44 -0300 |
commit | a6e725229813ae54674f4ed116b3e515fc1d8dbb (patch) | |
tree | 7fe394526ff5970f85fca5a57322067e5c386911 | |
parent | 693fd72b9ac62eebe8ad99622634cadc66fd4633 (diff) | |
download | hercules-a6e725229813ae54674f4ed116b3e515fc1d8dbb.tar.gz hercules-a6e725229813ae54674f4ed116b3e515fc1d8dbb.tar.bz2 hercules-a6e725229813ae54674f4ed116b3e515fc1d8dbb.tar.xz hercules-a6e725229813ae54674f4ed116b3e515fc1d8dbb.zip |
One more fix at "bindatcmd" command. Related to bug:7240.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17121 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/map/npc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index aa44d8840..124446d62 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2911,11 +2911,13 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c for( i = 0; i < ( strlen( message ) + 1 ) && k < 127; i ++ ) { if( message[i] == ' ' || message[i] == '\0' ) { if( message[ ( i - 1 ) ] == ' ' ) { - continue; // To prevent "@atcmd [space][space][space]..." + continue; // To prevent "@atcmd [space][space]" and .@atcmd_numparameters return 1 without any parameter. } temp[k] = '\0'; k = 0; - setd_sub( st, NULL, ".@atcmd_parameters$", j++, (void *)temp, NULL ); + if( temp[0] != '\0' ) { + setd_sub( st, NULL, ".@atcmd_parameters$", j++, (void *)temp, NULL ); + } } else { temp[k] = message[i]; k++; |