This voting is about merging the changes of topic branch issue-#55
(DevPacker.RemoveWhiteSpaces loops at the end of the text) to master.
For the issue see http://redmine.blackboxframework.org/issues/55.
For the changes see http://redmine.blackboxframework.org/pr ... c03600dc32.
The changes are based on the proposal in CPC 1.7 rc5 and fix an endless loop
that appears when reading past the end of text in DevPacker.
Gentlemen, please cast your vote.
- Josef
issue-#55 endless loop in DevPacker.RemoveWhiteSpaces
- Josef Templ
- Posts: 2048
- Joined: Tue Sep 17, 2013 6:50 am
issue-#55 endless loop in DevPacker.RemoveWhiteSpaces
Last edited by Josef Templ on Tue Jun 02, 2015 5:36 am, edited 1 time in total.
- DGDanforth
- Posts: 1061
- Joined: Tue Sep 17, 2013 1:16 am
- Location: Palo Alto, California, USA
- Contact:
Re: issue-#55 endless loop in DevPacker.RemoveWhiteSpaces
Code: Select all
WHILE ~rd.eot & (rd.Pos() <= end) & (rd.char <= 20X) DO GetCh(rd) END
GetCh(rd);
WHILE ~rd.eot & (rd.Pos() <= end) & (rd.char <= 20X) DO GetCh(rd) END
- Josef Templ
- Posts: 2048
- Joined: Tue Sep 17, 2013 6:50 am
Re: issue-#55 endless loop in DevPacker.RemoveWhiteSpaces
As far as I see, "GetCh(rd);" is always called prior to RemoveWhiteSpaces.
rd always starts at PackThis, which starts with ParseExe, which starts with GetCh.
Thus, rd.eot should be well defined in all cases.
The suggested alternative solution would skip a character in many cases.
- Josef
rd always starts at PackThis, which starts with ParseExe, which starts with GetCh.
Thus, rd.eot should be well defined in all cases.
The suggested alternative solution would skip a character in many cases.
- Josef