Created
March 28, 2017 19:22
-
-
Save timo/d528aaa26562c2afd9bb1afc6dfa06c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/math/bigintops.c b/src/math/bigintops.c | |
index b52a203..916f179 100644 | |
--- a/src/math/bigintops.c | |
+++ b/src/math/bigintops.c | |
@@ -13,8 +13,8 @@ MVM_STATIC_INLINE void adjust_nursery(MVMThreadContext *tc, MVMP6bigintBody *bod | |
if (MVM_BIGINT_IS_BIG(body)) { | |
int used = USED(body->u.bigint); | |
int adjustment = MIN(used, 32768) & ~0x7; | |
- if (adjustment && ((tc->nursery_alloc_limit - adjustment) > tc->nursery_alloc)) { | |
- tc->nursery_alloc_limit -= adjustment; | |
+ if (adjustment && (((char *)(tc->nursery_alloc_limit) - adjustment) > tc->nursery_alloc)) { | |
+ tc->nursery_alloc_limit = (char *)(tc->nursery_alloc_limit) - adjustment; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment