projects
/
platform
/
upstream
/
nasm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cb033e
)
strfunc: fix UTF-8 mid-character limit
author
H. Peter Anvin
<hpa@zytor.com>
Sun, 15 Jun 2008 04:07:09 +0000
(21:07 -0700)
committer
H. Peter Anvin
<hpa@zytor.com>
Sun, 15 Jun 2008 04:07:09 +0000
(21:07 -0700)
strfunc.c
patch
|
blob
|
history
diff --git
a/strfunc.c
b/strfunc.c
index
ac56ac7
..
5929aae
100644
(file)
--- a/
strfunc.c
+++ b/
strfunc.c
@@
-46,7
+46,7
@@
static size_t utf8_to_16le(uint8_t *str, size_t len, char *op)
if (c < 0x80) {
EMIT(c);
- } else if (c < 0x
a
0 || c >= 0xfe) {
+ } else if (c < 0x
c
0 || c >= 0xfe) {
/* Invalid UTF-8 */
return -1;
} else if (c < 0xe0) {
@@
-110,7
+110,7
@@
static size_t utf8_to_32le(uint8_t *str, size_t len, char *op)
if (c < 0x80) {
EMIT(c);
- } else if (c < 0x
a
0 || c >= 0xfe) {
+ } else if (c < 0x
c
0 || c >= 0xfe) {
/* Invalid UTF-8 */
return -1;
} else if (c < 0xe0) {