From f0eaf6b1b4b7e4d4e752c50dae1e147c71a0c42e Mon Sep 17 00:00:00 2001 From: uz Date: Wed, 3 Aug 2011 19:37:53 +0000 Subject: [PATCH] Fixed an off-by-one error. git-svn-id: svn://svn.cc65.org/cc65/trunk@5111 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/dbginfo/dbginfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dbginfo/dbginfo.c b/src/dbginfo/dbginfo.c index 339f71f83..bd83cb47c 100644 --- a/src/dbginfo/dbginfo.c +++ b/src/dbginfo/dbginfo.c @@ -3152,7 +3152,7 @@ static int FindLineInfoByLine (Collection* LineInfos, cc65_line Line, static void ProcessSymInfo (InputData* D) /* Postprocess symbol infos */ -{ +{ /* Get pointers to the symbol info collections */ Collection* SymInfoById = &D->Info->SymInfoById; Collection* SymInfoByName = &D->Info->SymInfoByName; @@ -3626,10 +3626,10 @@ cc65_lineinfo* cc65_lineinfo_byname (cc65_dbginfo Handle, const char* FileName, CollAppend (&LineInfoList, L); /* Check if the next one is also a match */ - if (LineIndex >= CollCount (&F->LineInfoByLine)) { + if (++LineIndex >= CollCount (&F->LineInfoByLine)) { break; } - L = CollAt (&F->LineInfoByLine, ++LineIndex); + L = CollAt (&F->LineInfoByLine, LineIndex); if (L->Line != Line) { Found = 0; } -- 2.39.5