From 9c267dab89e9a75976328a324d770f4426537f1f Mon Sep 17 00:00:00 2001 From: uz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81> Date: Mon, 30 May 2011 21:56:27 +0000 Subject: [PATCH] The terminating zero was missing in several places where a string buffer was copied to CurTok.SVal. git-svn-id: svn://svn.cc65.org/cc65/trunk@5030 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/nexttok.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ca65/nexttok.c b/src/ca65/nexttok.c index 77e0ec4ef..daea4a338 100644 --- a/src/ca65/nexttok.c +++ b/src/ca65/nexttok.c @@ -182,6 +182,7 @@ static void FuncConcat (void) } else { CurTok.Tok = TOK_STRCON; SB_Copy (&CurTok.SVal, &Buf); + SB_Terminate (&CurTok.SVal); } /* Free the string buffer */ @@ -255,6 +256,7 @@ static void FuncIdent (void) } else { CurTok.Tok = Id; SB_Copy (&CurTok.SVal, &Buf); + SB_Terminate (&CurTok.SVal); } /* Free buffer memory */ @@ -601,6 +603,7 @@ static void FuncSPrintF (void) } else { CurTok.Tok = TOK_STRCON; SB_Copy (&CurTok.SVal, &R); + SB_Terminate (&CurTok.SVal); } @@ -643,6 +646,7 @@ static void FuncString (void) } else { CurTok.Tok = TOK_STRCON; SB_Copy (&CurTok.SVal, &Buf); + SB_Terminate (&CurTok.SVal); } /* Free string memory */