From a8c3a335911a0adaaa0759aec5e0041ed994b908 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 21 Jan 2014 22:35:24 -0500 Subject: [PATCH] cmLex.c : The quoted string matcher now correctly handles escaped double quotes. --- cmLex.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/cmLex.c b/cmLex.c index 7267493..5f89e7c 100644 --- a/cmLex.c +++ b/cmLex.c @@ -323,19 +323,30 @@ unsigned _cmLexIdentMatcher( cmLex* p, const cmChar_t* cp, unsigned cn, const cm unsigned _cmLexQStrMatcher( cmLex* p, const cmChar_t* cp, unsigned cn, const cmChar_t* keyStr ) { - cmChar_t qStr[]="\""; - unsigned n = strlen(qStr); - if( strncmp(qStr,cp,n) == 0 ) + bool escFl = false; + unsigned i = 0; + if( cp[i] != '"' ) + return 0; + + for(i=1; i