diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-10-12 13:29:23 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-10-12 13:29:23 -0400 |
| commit | 55afc5a5fd93f4e45aeab7f08ed8faee86377d12 (patch) | |
| tree | 9387c550f0e6f5748c77376656c53abdf579e2c1 /stdlib | |
| parent | a92021f40b2489e0a6d915f02b6d6ad912fd3d77 (diff) | |
Further progress and bugfixes
Diffstat (limited to 'stdlib')
| -rw-r--r-- | stdlib/text.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/text.c b/stdlib/text.c index 96b0c2cd..0af95413 100644 --- a/stdlib/text.c +++ b/stdlib/text.c @@ -629,7 +629,7 @@ public Text_t Text$from_strn(const char *str, size_t len) ucs4_t buf[128]; size_t length = sizeof(buf)/sizeof(buf[0]); - ucs4_t *codepoints = u8_to_u32((uint8_t*)str, (size_t)ascii_span + strlen(str + ascii_span), buf, &length); + ucs4_t *codepoints = u8_to_u32((uint8_t*)str, len, buf, &length); Text_t ret = text_from_u32(codepoints, (int64_t)length, true); if (codepoints != buf) free(codepoints); return ret; |
