From c3efd64b27c350fe1a45a7821d2f1f13c324dc44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 19 May 2007 17:13:55 +0000 Subject: [PATCH] Building Statement List: MALLOC. Bug fix (strdup is a malloc) --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 1e4423043..a8f3ba441 100644 --- a/main.cpp +++ b/main.cpp @@ -687,9 +687,9 @@ void CreateStatementList() TOKEN *rs = eq->next; bool ismalloc = false; - if ( rs->str[0] == '(' ) + ismalloc |= match(rs, "strdup ("); + if (rs->str[0]=='(' && IsName(getstr(rs,1))) { - ismalloc |= match(rs, "strdup ("); ismalloc |= match(rs, "( type * ) malloc ("); ismalloc |= match(rs, "( type * * ) malloc ("); ismalloc |= match(rs, "( type type * ) malloc (");