/diff.patch Secret
Created
April 6, 2017 02:32
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/strings/ops.c b/src/strings/ops.c | |
index 76015bff..b0ad843f 100644 | |
--- a/src/strings/ops.c | |
+++ b/src/strings/ops.c | |
@@ -71,10 +71,14 @@ static MVMString * collapse_strands(MVMThreadContext *tc, MVMString *orig) { | |
MVM_string_gi_init(tc, &gi, orig); | |
for (i = 0; i < ographs; i++) { | |
- MVMGrapheme32 g = MVM_string_gi_get_grapheme(tc, &gi); | |
- if (g < -127 || g > 127) | |
+ result->body.storage.blob_32[i] = MVM_string_gi_get_grapheme(tc, &gi); | |
+ } | |
+ | |
+ for (i = 0; i < ographs; i++) { | |
+ if (result->body.storage.blob_32[i] < -127 || result->body.storage.blob_32[i] > 127) { | |
can_use_8bit = 0; | |
- result->body.storage.blob_32[i] = g; | |
+ break; | |
+ } | |
} | |
if (can_use_8bit) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment