Submitter | Patrick Georgi |
---|---|
Date | 2009-09-18 18:04:58 |
Message ID | <1253297098.29976.116.camel@tetris> |
Download | mbox | patch |
Permalink | /patch/268/ |
State | Superseded |
Headers | show |
Comments
> > I wasn't sure where the best place to put the increment of current was. > Do > > you have any suggestions? > Primitive solution: duplicate the increment? (see patch) That stops the infinite loop, but silently fails to add the payload. That's where I first thought of putting it too. Thanks, Myles
Patch
Index: util/cbfstool/common.c =================================================================== --- util/cbfstool/common.c (Revision 4637) +++ util/cbfstool/common.c (Arbeitskopie) @@ -201,8 +201,12 @@ contentsize); break; } - if (location == 0) + if (location == 0) { + current = + ALIGN(current + ntohl(thisfile->len) + + ntohl(thisfile->offset), align); continue; + } /* CBFS has the constraint that the chain always moves up in memory. so once we're past the place we seek, we don't need to look any further */