From a6e725229813ae54674f4ed116b3e515fc1d8dbb Mon Sep 17 00:00:00 2001 From: ediejohnny Date: Mon, 4 Feb 2013 21:57:52 +0000 Subject: 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 --- src/map/npc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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++; -- cgit v1.2.3-70-g09d2