You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2021/11/07 17:47:24 UTC
[incubator-nuttx] 01/02: tools/mkconfig: Handle string with escape
character correctly
This is an automated email from the ASF dual-hosted git repository.
aguettouche pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit e81182df14e61b5c501d5af0901f3ca0e1867d6a
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 7 22:08:01 2021 +0800
tools/mkconfig: Handle string with escape character correctly
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
tools/cfgdefine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/cfgdefine.c b/tools/cfgdefine.c
index 6a335a0..0f225be 100644
--- a/tools/cfgdefine.c
+++ b/tools/cfgdefine.c
@@ -106,7 +106,7 @@ static char *find_value_end(char *ptr)
{
if (*ptr == '"')
{
- do ptr++; while (*ptr && *ptr != '"');
+ do ptr++; while (*ptr && (*ptr != '"' || *(ptr - 1) == '\\'));
if (*ptr) ptr++;
}
else