From: uz Date: Thu, 10 Feb 2011 22:18:24 +0000 (+0000) Subject: Fixed an error: The collection for the line infos hasn't been initialized. X-Git-Tag: V2.13.3~486 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=93f8985e47206842d53d80e691155efe9fc01de6;p=cc65 Fixed an error: The collection for the line infos hasn't been initialized. git-svn-id: svn://svn.cc65.org/cc65/trunk@4974 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ld65/asserts.c b/src/ld65/asserts.c index d71190702..f0aafdb28 100644 --- a/src/ld65/asserts.c +++ b/src/ld65/asserts.c @@ -82,9 +82,10 @@ Assertion* ReadAssertion (FILE* F, struct ObjData* O) Assertion* A = xmalloc (sizeof (Assertion)); /* Read the fields from the file */ - A->Expr = ReadExpr (F, O); - A->Action = (AssertAction) ReadVar (F); - A->Msg = MakeGlobalStringId (O, ReadVar (F)); + A->LineInfos = EmptyCollection; + A->Expr = ReadExpr (F, O); + A->Action = (AssertAction) ReadVar (F); + A->Msg = MakeGlobalStringId (O, ReadVar (F)); ReadLineInfoList (F, O, &A->LineInfos); /* Set remaining fields */ @@ -107,7 +108,7 @@ void CheckAssertions (void) /* Walk over all assertions */ for (I = 0; I < CollCount (&Assertions); ++I) { - const LineInfo* LI; + const LineInfo* LI; const char* Module; unsigned long Line; @@ -121,7 +122,7 @@ void CheckAssertions (void) /* Retrieve the relevant line info for this assertion */ LI = CollConstAt (&A->LineInfos, 0); - + /* Get file name and line number from the source */ Module = GetSourceName (LI); Line = GetSourceLine (LI); @@ -156,6 +157,6 @@ void CheckAssertions (void) } } } - +