diff options
| author | Quentin Carbonneaux | 2014-09-05 16:34:43 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-09-05 16:34:43 -0400 |
| commit | bf4a4fdd88c686a0774d8321c6462fbe4588362a (patch) | |
| tree | c1b11a997fbd4ae7fbb17a25c164b8a07b91c808 | |
| parent | 6001744256164f92aa609f3af402278f829766f9 (diff) | |
optimize utf8_decode_rune for ascii
| -rw-r--r-- | unicode.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -124,8 +124,8 @@ utf8_decode_rune(Rune *r, const unsigned char *str, int len) c = *str++; if (c < 0x80) { - read = 1; - ucs = c; + *r = c; + return 1; } else if (c < 0xc0) { goto fail; |
