Skip to content

Commit

Permalink
Grow normalization output buffer sufficiently.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jun 5, 2015
1 parent 6ae0ed4 commit 2bc39a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/strings/normalize.c
Expand Up @@ -24,7 +24,8 @@ static void assert_codepoint_array(MVMThreadContext *tc, MVMObject *arr, char *e
}
MVM_STATIC_INLINE void maybe_grow_result(MVMCodepoint **result, MVMint64 *result_alloc, MVMint64 needed) {
if (needed >= *result_alloc) {
*result_alloc += 32;
while (needed >= *result_alloc)
*result_alloc += 32;
*result = MVM_realloc(*result, *result_alloc * sizeof(MVMCodepoint));
}
}
Expand Down

0 comments on commit 2bc39a6

Please sign in to comment.