Эх сурвалжийг харах

misc/loglevel.h: fix overflow

ambrop7 13 жил өмнө
parent
commit
b5d316fc90
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      misc/loglevel.h

+ 1 - 1
misc/loglevel.h

@@ -69,7 +69,7 @@ int parse_loglevel (char *str)
     }
     
     char *endptr;
-    int res = strtol(str, &endptr, 10);
+    long int res = strtol(str, &endptr, 10);
     if (*str && !*endptr && res >= 0 && res <= BLOG_DEBUG) {
         return res;
     }