diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-11-28 09:03:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-28 09:03:15 +0100 |
commit | a6751e6c58e73d6b8d04e98bba5fb6e380fdf34f (patch) | |
tree | bf22de8b8d89dee6a3b59c22adacff8f62a8d5eb /core/variant | |
parent | bd846001327dacd35a84b0759f8b7ca8b892e841 (diff) | |
parent | 7e2c0ffd1a19d5806a7fcf57e25d2465f7a8f8b6 (diff) |
Merge pull request #41100 from bruvzg/ctl_text_server_interface
[Complex Text Layouts] Implement TextServer interface.
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/variant_call.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index 13514b7b9f..214c424013 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -418,7 +418,7 @@ struct _VariantCall { String s; if (p_instance->size() > 0) { const uint8_t *r = p_instance->ptr(); - s.parse_utf16((const char16_t *)r, p_instance->size() / 2); + s.parse_utf16((const char16_t *)r, floor((double)p_instance->size() / (double)sizeof(char16_t))); } return s; } @@ -427,7 +427,7 @@ struct _VariantCall { String s; if (p_instance->size() > 0) { const uint8_t *r = p_instance->ptr(); - s = String((const char32_t *)r, p_instance->size() / 4); + s = String((const char32_t *)r, floor((double)p_instance->size() / (double)sizeof(char32_t))); } return s; } |