Explorar o código

- fix_param returns 1 when FPARAM_INT is used and the parameter
is not a number
Closes SER-101

Jan Janak %!s(int64=19) %!d(string=hai) anos
pai
achega
17d9dfcfe1
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      sr_module.c

+ 3 - 3
sr_module.c

@@ -764,9 +764,9 @@ int fix_param(int type, void** param)
 		if (err == 0) {
 			p->v.i = num;
 		} else {
-			ERR("Bad number <%s>\n",
-			    (char*)(*param));
-			goto error;
+			     /* Not a number */
+			pkg_free(p);
+			return 1;
 		}
 		break;