From 5359e0ca10669b08eebd1beaaa2e9fb05cf9ac52 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Tue, 27 Dec 2016 21:39:37 +0100 Subject: runserver: fixed bug when calling with -m --- src/blogc-runserver/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/blogc-runserver') diff --git a/src/blogc-runserver/main.c b/src/blogc-runserver/main.c index 7f83f42..3b6f2c2 100644 --- a/src/blogc-runserver/main.c +++ b/src/blogc-runserver/main.c @@ -89,7 +89,7 @@ main(int argc, char **argv) ptr = argv[i] + 2; else ptr = argv[++i]; - max_threads = strtoul(argv[++i], NULL, 10); + max_threads = strtoul(ptr, &endptr, 10); if (*ptr != '\0' && *endptr != '\0') fprintf(stderr, "blogc-runserver: warning: invalid value " "for -m argument: %s. using %zu instead\n", ptr, max_threads); -- cgit v1.2.3-18-g5258