summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Oisín Mac Fhearaí <denpashogai@gmail.com>2019-08-29 21:39:53 +0100
committerGravatar Oisín Mac Fhearaí <denpashogai@gmail.com>2019-08-29 21:39:53 +0100
commit0490176b675eb3ea36cd51fa5d1fd41a3126c10c (patch)
tree41381133e7d5215ab67c416c20814745668354be
parent5e2ebc973f19fe8e5fdbe20e102e445329b528b0 (diff)
PR suggestions (with thanks to @fabriceleal).
-rw-r--r--src/c/urweb.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c
index 62561828..af929269 100644
--- a/src/c/urweb.c
+++ b/src/c/urweb.c
@@ -2351,14 +2351,10 @@ uw_unit uw_Basis_htmlifySpecialChar_w(uw_context ctx, uw_Basis_char ch) {
if(uw_Basis_isprint(ctx, ch)) {
- const UChar ins[1] = { ch };
- char buf[5];
int32_t len_written = 0;
UErrorCode err = U_ZERO_ERROR;
- u_strToUTF8(buf, 5, &len_written, ins, 1, &err);
- sprintf(ctx->page.front, "%s", buf);
- // printf("buf: %s, hex: %x, len_written: %d, err: %s\n", buf, ch, len_written, u_errorName(err));
+ u_strToUTF8(ctx->page.front, 5, &len_written, (const UChar*)&ch, 1, &err);
len = len_written;
}