diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/script.c b/src/map/script.c index 5cdd16367..45c954dc0 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -16111,7 +16111,6 @@ static BUILDIN(atcommand) struct map_session_data *sd, *dummy_sd = NULL; int fd; const char* cmd; - bool ret = true; cmd = script_getstr(st,2); @@ -16134,11 +16133,12 @@ static BUILDIN(atcommand) if (!atcommand->exec(fd, sd, cmd, false)) { ShowWarning("script: buildin_atcommand: failed to execute command '%s'\n", cmd); - script->reportsrc(st); - ret = false; + if (dummy_sd != NULL) + aFree(dummy_sd); + return false; } if (dummy_sd) aFree(dummy_sd); - return ret; + return true; } /** |