Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created November 17, 2013 13:53
Show Gist options
  • Save jnthn/7513691 to your computer and use it in GitHub Desktop.
Save jnthn/7513691 to your computer and use it in GitHub Desktop.
diff --git a/src/core/loadbytecode.c b/src/core/loadbytecode.c
index b0a28f1..cb8ded3 100644
--- a/src/core/loadbytecode.c
+++ b/src/core/loadbytecode.c
@@ -37,8 +37,10 @@ static MVMString * figure_filename(MVMThreadContext *tc, MVMString *orig) {
}
MVMROOT(tc, orig, {
result = MVM_string_utf8_decode(tc, tc->instance->VMString, new_path, new_len);
- if (!MVM_file_exists(tc, result))
- result = orig;
+ MVMROOT(tc, result, {
+ if (!MVM_file_exists(tc, result))
+ result = orig;
+ });
});
free(new_path);
return result;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment