|
@@ -4956,7 +4956,7 @@ 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 ++ ) {
|
|
for( i = 0; i < ( strlen( message ) + 1 ) && k < 127; i ++ ) {
|
|
if( message[i] == ' ' || message[i] == '\0' ) {
|
|
if( message[i] == ' ' || message[i] == '\0' ) {
|
|
- if( message[ ( i - 1 ) ] == ' ' ) {
|
|
|
|
|
|
+ if (i > 0 && message[i - 1] == ' ') {
|
|
continue; // To prevent "@atcmd [space][space]" and .@atcmd_numparameters return 1 without any parameter.
|
|
continue; // To prevent "@atcmd [space][space]" and .@atcmd_numparameters return 1 without any parameter.
|
|
}
|
|
}
|
|
temp[k] = '\0';
|
|
temp[k] = '\0';
|