forked from pool/alsa-utils
42 lines
1.0 KiB
Diff
42 lines
1.0 KiB
Diff
|
From 160b47e27c787880f1581a0f2e70138f6b24c41b Mon Sep 17 00:00:00 2001
|
||
|
From: Jaroslav Kysela <perex@perex.cz>
|
||
|
Date: Sat, 30 Nov 2019 20:38:17 +0100
|
||
|
Subject: [PATCH 10/26] alsaucm: dump - fix the prefixed "
|
||
|
|
||
|
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||
|
---
|
||
|
alsaucm/dump.c | 8 ++++----
|
||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/alsaucm/dump.c b/alsaucm/dump.c
|
||
|
index bc638f1588e9..7a90c828fe1f 100644
|
||
|
--- a/alsaucm/dump.c
|
||
|
+++ b/alsaucm/dump.c
|
||
|
@@ -73,9 +73,9 @@ static char *tesc(const char *s, char *buf, size_t buf_len)
|
||
|
buf_len--;
|
||
|
}
|
||
|
while (*s && buf_len > 2) {
|
||
|
- if (*s == '\"') {
|
||
|
+ if (*s == '"') {
|
||
|
if (buf_len > 3) {
|
||
|
- *dst++ = '"';
|
||
|
+ *dst++ = '\\';
|
||
|
*dst++ = *s++;
|
||
|
buf_len -= 2;
|
||
|
continue;
|
||
|
@@ -240,9 +240,9 @@ static char *jesc(const char *s, char *buf, size_t buf_len)
|
||
|
*dst++ = c;
|
||
|
buf_len--;
|
||
|
while (*s && buf_len > 2) {
|
||
|
- if (*s == '\"') {
|
||
|
+ if (*s == '"') {
|
||
|
if (buf_len > 3) {
|
||
|
- *dst++ = '"';
|
||
|
+ *dst++ = '\\';
|
||
|
*dst++ = *s++;
|
||
|
buf_len -= 2;
|
||
|
continue;
|
||
|
--
|
||
|
2.16.4
|
||
|
|