summaryrefslogtreecommitdiffstats
path: root/utf8.h
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2021-02-19 22:08:22 +0100
committerpgen <p.gen.progs@gmail.com>2021-02-19 23:31:04 +0100
commitdf9f37847eca8da7dbae177b8e70582af0ea8c6f (patch)
treeed31655543b01fe30bdc71f34961ec772b62bec1 /utf8.h
parent0a398c7bb7deab04f61861fd4423c289a4a5db0b (diff)
Change the implementation of utf8_validate
Thanks to Markus Kuhn for this code. The old implementation was not foolproof.
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/utf8.h b/utf8.h
index a43d5af..855a3c8 100644
--- a/utf8.h
+++ b/utf8.h
@@ -42,8 +42,8 @@ cptoutf8(char * utf8_str, uint32_t c);
int
utf8_interpret(char * s, langinfo_t * langinfo, char sc);
-int
-utf8_validate(const char * str, size_t length);
+unsigned char *
+utf8_validate(unsigned char * str);
char *
utf8_prev(const char * str, const char * p);