Fixed premature loop exit bug in zipfile.cpp