From a85d5330fab3ffd8053f6d6f54b46da18de766f8 Mon Sep 17 00:00:00 2001 From: acqn Date: Sun, 4 Oct 2020 12:15:59 +0800 Subject: [PATCH] Fixed StrBuf initialization in PreparseArg(). --- src/cc65/codeent.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cc65/codeent.c b/src/cc65/codeent.c index f3a910652..dd2000db0 100644 --- a/src/cc65/codeent.c +++ b/src/cc65/codeent.c @@ -585,8 +585,7 @@ const char* MakeHexArg (unsigned Num) void PreparseArg (CodeEntry* E) /* Parse the argument string and memorize the result for the code entry */ { - StrBuf B; - SB_InitFromString (&B, xmalloc (strlen (E->Arg) + 1)); + StrBuf B = AUTO_STRBUF_INITIALIZER; /* Parse the argument string */ if (ParseOpcArgStr (E->Arg, &E->ArgInfo, &B, &E->ArgOff)) {