X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..6afa47d63d56094958ed4d2528bf45ad67340954:/src/common/zipstrm.cpp diff --git a/src/common/zipstrm.cpp b/src/common/zipstrm.cpp index 6a7ebb12cc..d01d464df2 100644 --- a/src/common/zipstrm.cpp +++ b/src/common/zipstrm.cpp @@ -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;