summaryrefslogtreecommitdiffstats
path: root/src/pulse/utf8.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-09-14 16:25:35 +0800
committerDaniel Mack <daniel@caiaq.de>2009-09-14 16:25:35 +0800
commitbebaa491650c48697b861ec5e76816e9af1a8803 (patch)
treeb57d38476473f8fc6e282f8c39f730c936fa10d4 /src/pulse/utf8.c
parentc6d330ef91ce401660f907536b1bfd0591c14c2a (diff)
parent180ef1eebdfbdf0220af1fb5e4bf43e348207cde (diff)
Merge branch 'master' of git://0pointer.de/pulseaudio
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: