[jit] Fix mono_debug_count () so it doesn't confuse COUNT=0 with COUNT not being...
authorZoltan Varga <vargaz@gmail.com>
Sun, 2 Jul 2017 22:05:18 +0000 (18:05 -0400)
committerZoltan Varga <vargaz@gmail.com>
Sun, 2 Jul 2017 22:05:38 +0000 (18:05 -0400)
mono/mini/mini-runtime.c

index 64528e75c4eede6ff8aec27badb020472dc88502..77c69bb937514fec3a43b0fdfa691a26ca555a97 100644 (file)
@@ -574,7 +574,7 @@ G_GNUC_UNUSED gboolean
 mono_debug_count (void)
 {
        static int count = 0, int_val = 0;
-       static gboolean inited;
+       static gboolean inited, has_value = FALSE;
 
        count ++;
 
@@ -583,11 +583,12 @@ mono_debug_count (void)
                if (value) {
                        int_val = atoi (value);
                        g_free (value);
+                       has_value = TRUE;
                }
                inited = TRUE;
        }
 
-       if (!int_val)
+       if (!has_value)
                return TRUE;
 
        if (count == int_val)