Ver Fonte

Follow up to 98fdf31

* Fixes an uninitialized variable.
Aleos há 9 anos atrás
pai
commit
0d43d26fb9
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      src/map/script.c

+ 3 - 2
src/map/script.c

@@ -21439,9 +21439,10 @@ BUILDIN_FUNC(getexp2) {
 * @author [secretdataz]
 **/
 BUILDIN_FUNC(recalculatestat) {
-	TBL_PC* sd;
+	TBL_PC* sd = script_rid2sd(st);
 
-	nullpo_retr(SCRIPT_CMD_FAILURE, sd);
+	if (sd == NULL)
+		return SCRIPT_CMD_FAILURE;
 
 	status_calc_pc(sd, SCO_FORCE);
 	return SCRIPT_CMD_SUCCESS;