diff --git a/src/ld65/lineinfo.c b/src/ld65/lineinfo.c index c75dec8a8..d56bfc3bd 100644 --- a/src/ld65/lineinfo.c +++ b/src/ld65/lineinfo.c @@ -129,6 +129,9 @@ void ReadLineInfoList (FILE* F, ObjData* O, Collection* LineInfos) /* Read the number of line info indices that follow */ unsigned LineInfoCount = ReadVar (F); + /* Grow the collection as needed */ + CollGrow (LineInfos, LineInfoCount); + /* Read the line infos and resolve them */ while (LineInfoCount--) {