mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:25:43 +01:00
alsaucm: dump - fix the prefixed "
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
49716fa61e
commit
160b47e27c
1 changed files with 4 additions and 4 deletions
|
@ -73,9 +73,9 @@ static char *tesc(const char *s, char *buf, size_t buf_len)
|
||||||
buf_len--;
|
buf_len--;
|
||||||
}
|
}
|
||||||
while (*s && buf_len > 2) {
|
while (*s && buf_len > 2) {
|
||||||
if (*s == '\"') {
|
if (*s == '"') {
|
||||||
if (buf_len > 3) {
|
if (buf_len > 3) {
|
||||||
*dst++ = '"';
|
*dst++ = '\\';
|
||||||
*dst++ = *s++;
|
*dst++ = *s++;
|
||||||
buf_len -= 2;
|
buf_len -= 2;
|
||||||
continue;
|
continue;
|
||||||
|
@ -240,9 +240,9 @@ static char *jesc(const char *s, char *buf, size_t buf_len)
|
||||||
*dst++ = c;
|
*dst++ = c;
|
||||||
buf_len--;
|
buf_len--;
|
||||||
while (*s && buf_len > 2) {
|
while (*s && buf_len > 2) {
|
||||||
if (*s == '\"') {
|
if (*s == '"') {
|
||||||
if (buf_len > 3) {
|
if (buf_len > 3) {
|
||||||
*dst++ = '"';
|
*dst++ = '\\';
|
||||||
*dst++ = *s++;
|
*dst++ = *s++;
|
||||||
buf_len -= 2;
|
buf_len -= 2;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue