mirror of
https://github.com/cc65/cc65.git
synced 2025-01-27 09:33:42 +00:00
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
This commit is contained in:
parent
804169fb7f
commit
93f8985e47
@ -82,9 +82,10 @@ Assertion* ReadAssertion (FILE* F, struct ObjData* O)
|
|||||||
Assertion* A = xmalloc (sizeof (Assertion));
|
Assertion* A = xmalloc (sizeof (Assertion));
|
||||||
|
|
||||||
/* Read the fields from the file */
|
/* Read the fields from the file */
|
||||||
A->Expr = ReadExpr (F, O);
|
A->LineInfos = EmptyCollection;
|
||||||
A->Action = (AssertAction) ReadVar (F);
|
A->Expr = ReadExpr (F, O);
|
||||||
A->Msg = MakeGlobalStringId (O, ReadVar (F));
|
A->Action = (AssertAction) ReadVar (F);
|
||||||
|
A->Msg = MakeGlobalStringId (O, ReadVar (F));
|
||||||
ReadLineInfoList (F, O, &A->LineInfos);
|
ReadLineInfoList (F, O, &A->LineInfos);
|
||||||
|
|
||||||
/* Set remaining fields */
|
/* Set remaining fields */
|
||||||
@ -107,7 +108,7 @@ void CheckAssertions (void)
|
|||||||
/* Walk over all assertions */
|
/* Walk over all assertions */
|
||||||
for (I = 0; I < CollCount (&Assertions); ++I) {
|
for (I = 0; I < CollCount (&Assertions); ++I) {
|
||||||
|
|
||||||
const LineInfo* LI;
|
const LineInfo* LI;
|
||||||
const char* Module;
|
const char* Module;
|
||||||
unsigned long Line;
|
unsigned long Line;
|
||||||
|
|
||||||
@ -121,7 +122,7 @@ void CheckAssertions (void)
|
|||||||
|
|
||||||
/* Retrieve the relevant line info for this assertion */
|
/* Retrieve the relevant line info for this assertion */
|
||||||
LI = CollConstAt (&A->LineInfos, 0);
|
LI = CollConstAt (&A->LineInfos, 0);
|
||||||
|
|
||||||
/* Get file name and line number from the source */
|
/* Get file name and line number from the source */
|
||||||
Module = GetSourceName (LI);
|
Module = GetSourceName (LI);
|
||||||
Line = GetSourceLine (LI);
|
Line = GetSourceLine (LI);
|
||||||
@ -156,6 +157,6 @@ void CheckAssertions (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user