mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
* remove "const" from return type of pa_utf8_filter() since it desn't make any sense
* fix pa_utf8_filter() to not skip the next character too if it found an invalid one git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@877 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
23e74545ad
commit
e8cc63d756
2 changed files with 5 additions and 5 deletions
|
|
@ -61,7 +61,7 @@ static inline void merge_continuation_char(uint32_t *u_ch, uint8_t ch) {
|
|||
*u_ch |= ch & 0x3f;
|
||||
}
|
||||
|
||||
static const char* utf8_validate (const char *str, char *output) {
|
||||
static char* utf8_validate(const char *str, char *output) {
|
||||
uint32_t val = 0;
|
||||
uint32_t min = 0;
|
||||
const uint8_t *p, *last;
|
||||
|
|
@ -131,7 +131,7 @@ ONE_REMAINING:
|
|||
error:
|
||||
if (o) {
|
||||
*o = FILTER_CHAR;
|
||||
p = last + 1; /* We retry at the next character */
|
||||
p = last; /* We retry at the next character */
|
||||
} else
|
||||
goto failure;
|
||||
}
|
||||
|
|
@ -145,7 +145,7 @@ error:
|
|||
return output;
|
||||
}
|
||||
|
||||
return str;
|
||||
return (char*) str;
|
||||
|
||||
failure:
|
||||
return NULL;
|
||||
|
|
@ -155,7 +155,7 @@ const char* pa_utf8_valid (const char *str) {
|
|||
return utf8_validate(str, NULL);
|
||||
}
|
||||
|
||||
const char* pa_utf8_filter (const char *str) {
|
||||
char* pa_utf8_filter (const char *str) {
|
||||
char *new_str;
|
||||
|
||||
new_str = pa_xnew(char, strlen(str) + 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue