Преглед изворни кода

Fix va_arg in getareausers (#7108)

Vincent Stumpf пре 2 година
родитељ
комит
ca740549e2
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      src/map/script.cpp

+ 3 - 2
src/map/script.cpp

@@ -11712,7 +11712,7 @@ BUILDIN_FUNC(getmapusers)
  *------------------------------------------*/
 static int buildin_getareausers_sub(struct block_list *bl,va_list ap)
 {
-	int *users=va_arg(ap,int *);
+	int *users = va_arg(ap, int *);
 	(*users)++;
 	return SCRIPT_CMD_SUCCESS;
 }
@@ -11720,7 +11720,8 @@ static int buildin_getareausers_sub(struct block_list *bl,va_list ap)
 BUILDIN_FUNC(getareausers)
 {
 	const char *str;
-	int16 m,x0,y0,x1,y1,users=0; //doubt we can have more then 32k users on
+	int16 m,x0,y0,x1,y1;
+	int users = 0;
 	str=script_getstr(st,2);
 	x0=script_getnum(st,3);
 	y0=script_getnum(st,4);