diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-09-02 23:25:08 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-09-02 23:25:08 +0200 |
commit | eec0706333ecf28898b1879cae5dab791b307cf6 (patch) | |
tree | 93d8bf0126bc0716020138e0bb07bf74474552f0 | |
parent | 9d0acddf9a0e31f86da1064bd1cf6e8ed8e277ae (diff) | |
download | nncmpp-eec0706333ecf28898b1879cae5dab791b307cf6.tar.gz nncmpp-eec0706333ecf28898b1879cae5dab791b307cf6.tar.xz nncmpp-eec0706333ecf28898b1879cae5dab791b307cf6.zip |
Support libunistring versions before 1.2
-rw-r--r-- | nncmpp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -5911,9 +5911,9 @@ x11_render_editor (struct widget *self) // TODO: Make this scroll around the caret, and fade like labels. size_t len; ucs4_t *buf = xcalloc (e->len + 1, sizeof *buf); - *u32_pcpy (buf, e->line, e->point) = 0; + u32_cpy (buf, e->line, e->point); char *a = (char *) u32_to_u8 (buf, u32_strlen (buf) + 1, NULL, &len); - *u32_pcpy (buf, e->line + e->point, e->len - e->point) = 0; + u32_cpy (buf, e->line + e->point, e->len - e->point + 1); char *b = (char *) u32_to_u8 (buf, u32_strlen (buf) + 1, NULL, &len); free (buf); |