From b3233bcaa04c5f949eca3785c257cf115bf2bc3f Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 22 Oct 1992 16:00:05 +0000 Subject: [PATCH] Removed static buffer in gen_idf --- lang/cem/cemcom/idf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lang/cem/cemcom/idf.c b/lang/cem/cemcom/idf.c index 90c8fb1ec..b5bc6e78e 100644 --- a/lang/cem/cemcom/idf.c +++ b/lang/cem/cemcom/idf.c @@ -151,11 +151,14 @@ gen_idf() anonymous name. */ static int name_cnt; - char buff[100]; + struct idf *id; + char *s = Malloc(strlen(dot.tk_file)+50); - sprint(buff, "#%d in %s, line %u", + sprint(s, "#%d in %s, line %u", ++name_cnt, dot.tk_file, dot.tk_line); - return str2idf(buff); + id = str2idf(s); + free(s); + return id; } int -- 2.34.1