]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - opts.c
Remove one more external function
[xonotic/gmqcc.git] / opts.c
diff --git a/opts.c b/opts.c
index aa923bdeafebd93d42261f4f97e183a89e71f6e6..5a1ee1c10aadf4275677a5379dd38c80165c3993 100644 (file)
--- a/opts.c
+++ b/opts.c
@@ -142,6 +142,9 @@ void opts_setoptimlevel(unsigned int level) {
     size_t i;
     for (i = 0; i < COUNT_OPTIMIZATIONS; ++i)
         opts_set(opts.optimization, i, level >= opts_opt_oflag[i]);
+
+    if (!level)
+        opts.optimizeoff = true;
 }
 
 /*
@@ -254,7 +257,7 @@ static size_t opts_ini_parse (
 static bool opts_ini_bool(const char *value) {
     if (!strcmp(value, "true"))  return true;
     if (!strcmp(value, "false")) return false;
-    return !!atoi(value);
+    return !!strtol(value, NULL, 10);
 }
 
 static char *opts_ini_load(const char *section, const char *name, const char *value) {