Skip to content

Commit

Permalink
[jit] Fix mono_debug_count breakage introduced by the g_getenv change.
Browse files Browse the repository at this point in the history
  • Loading branch information
kumpera committed May 18, 2017
1 parent 0fd8ecd commit 414b5fc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mono/mini/mini-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,23 +583,23 @@ break_count (void)
G_GNUC_UNUSED gboolean
mono_debug_count (void)
{
static int count = 0;
static int count = 0, int_val = 0;
static gboolean inited;
static char *value;

count ++;

if (!inited) {
value = g_getenv ("COUNT");
char *value = g_getenv ("COUNT");
if (value) {
int_val = atoi (value);
g_free (value);
}
inited = TRUE;
}

if (!value)
if (!int_val)
return TRUE;

int int_val = atoi (value);
g_free (value);

if (count == int_val)
break_count ();

Expand Down

0 comments on commit 414b5fc

Please sign in to comment.