X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..3ca1bf5add01419ba173f0567b060fdd9fd605f9:/src/common/zipstrm.cpp diff --git a/src/common/zipstrm.cpp b/src/common/zipstrm.cpp index 6a7ebb12cc..3e8d0dead1 100644 --- a/src/common/zipstrm.cpp +++ b/src/common/zipstrm.cpp @@ -3,7 +3,7 @@ // Purpose: input stream for ZIP archive access // Author: Vaclav Slavik // Copyright: (c) 1999 Vaclav Slavik -// Licence: wxWindows Licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -40,13 +40,14 @@ wxZipInputStream::wxZipInputStream(const wxString& archive, const wxString& file m_Pos = 0; m_Size = 0; - m_Archive = (void*) unzOpen(archive.mb_str()); + m_Archive = (void*) unzOpen(archive.mb_str(wxConvFile)); if (m_Archive == NULL) { m_lasterror = wxSTREAM_READ_ERROR; return; } - if (unzLocateFile((unzFile)m_Archive, file.mb_str(), 0) != UNZ_OK) + // TODO what encoding does ZIP use? + if (unzLocateFile((unzFile)m_Archive, file.ToAscii(), 0) != UNZ_OK) { m_lasterror = wxSTREAM_READ_ERROR; return; @@ -122,7 +123,7 @@ off_t wxZipInputStream::OnSysSeek(off_t seek, wxSeekMode mode) default : nextpos = m_Pos; break; /* just to fool compiler, never happens */ } - size_t toskip = 0; + size_t toskip; if ( nextpos > m_Pos ) { toskip = nextpos - m_Pos;