-
-
Save jnthn/da10a4abd2199c91f8a0 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/6model/serialization.c b/src/6model/serialization.c | |
index ce3157e..1240376 100644 | |
--- a/src/6model/serialization.c | |
+++ b/src/6model/serialization.c | |
@@ -300,7 +300,7 @@ static void get_stable_ref_info(MVMThreadContext *tc, MVMSerializationWriter *wr | |
/* Expands current target storage as needed. */ | |
static void expand_storage_if_needed(MVMThreadContext *tc, MVMSerializationWriter *writer, MVMint64 need) { | |
- if (*(writer->cur_write_offset) + need > *(writer->cur_write_limit)) { | |
+ if (*(writer->cur_write_offset) + need >= *(writer->cur_write_limit)) { | |
*(writer->cur_write_limit) *= 2; | |
*(writer->cur_write_buffer) = (char *)realloc(*(writer->cur_write_buffer), | |
*(writer->cur_write_limit)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment