summaryrefslogtreecommitdiffstats
path: root/src/pulse/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulse/utf8.c')
-rw-r--r--src/pulse/utf8.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/pulse/utf8.c b/src/pulse/utf8.c
index 6b58bde3..fe7bcd26 100644
--- a/src/pulse/utf8.c
+++ b/src/pulse/utf8.c
@@ -120,10 +120,8 @@ static char* utf8_validate(const char *str, char *output) {
size = 4;
min = (1 << 16);
val = (uint32_t) (*p & 0x07);
- } else {
- size = 1;
+ } else
goto error;
- }
p++;
if (!is_continuation_char(*p))
@@ -150,12 +148,9 @@ ONE_REMAINING:
if (o) {
memcpy(o, last, (size_t) size);
- o += size - 1;
+ o += size;
}
- if (o)
- o++;
-
continue;
error: