Hopefully fixed parsing #include

This commit is contained in:
Pierre Pronchery 2013-06-06 01:54:23 +02:00
parent 11215a3861
commit 1bb20398f3

View File

@ -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);