[quake3-bugzilla] [Bug 5298] Support for .pk3dir

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Mon Jul 2 20:50:10 EDT 2012


https://bugzilla.icculus.org/show_bug.cgi?id=5298

q3urt.undead at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |q3urt.undead at gmail.com

--- Comment #4 from q3urt.undead at gmail.com 2012-07-02 20:50:06 EDT ---
(In reply to comment #3)
> I had to revert the patch. Apparently there's a problem where the code gets
> stuck in an infinite loop.

I didn't reproduce this error, but I see an infinite loop.  If you take "if
(pakwhich)" and the FS_LoadZipFile call fails, it will keep retrying the loop
with the same check.  pakfilesi and pakdirsi are never incremented if the
FS_LoadZipFile call fails.

I think the solution to the infinite loop is to increment pakfilesi:

if (pakwhich) {
    // The next .pk3 file is before the next .pk3dir
    pakfile = FS_BuildOSPath(path, dir, pakfiles[pakfilesi]);
    if ((pak = FS_LoadZipFile(pakfile, pakfiles[pakfilesi])) == 0) {
        // Invalid *.pk3.  Skip it and go on to the next pk3/pk3dir.
        pakfilesi++;
        continue;
    }

-- 
Configure bugmail: https://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the quake3-bugzilla mailing list