-
-
Save MasterDuke17/73b3709e16c807a7dcda174e528a64e6 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/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