From 1bb20398f32e6e745a98c3a404a6153bc2d04565 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Thu, 6 Jun 2013 01:54:23 +0200 Subject: [PATCH] Hopefully fixed parsing #include --- src/parser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 7bb4b5c..17bb792 100644 --- a/src/parser.c +++ b/src/parser.c @@ -637,8 +637,11 @@ static int _cpp_callback_header(Parser * parser, Token * token, int c, str[len] = '\0'; token_set_code(token, CPP_CODE_META_DATA); token_set_string(token, str); - if(cp->queue_string == NULL) + if(cp->queue_string == NULL || strlen(cp->queue_string) == 0) + { + free(cp->queue_string); cp->queue_string = str; + } else { free(str);