From 661652a9c62abefe0f4276055190a334bfa0de02 Mon Sep 17 00:00:00 2001 From: Stefan Sayer Date: Wed, 27 Oct 2010 00:24:31 +0200 Subject: [PATCH] support escaped " in config values (\") --- core/AmConfigReader.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/AmConfigReader.cpp b/core/AmConfigReader.cpp index 88c7a340..72802d96 100644 --- a/core/AmConfigReader.cpp +++ b/core/AmConfigReader.cpp @@ -96,10 +96,13 @@ int AmConfigReader::loadFile(const string& path) TRIM(c); if(*c == '"'){ - + char last_c = ' '; val_beg = ++c; - while( (*c != '"') && (*c != '\0') ) c++; + while( ((*c != '"') || (last_c == '\\')) && (*c != '\0') ) { + last_c = *c; + c++; + } if(*c == '\0') goto syntax_error;