A couple of fixes for wxChm
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -619,8 +619,11 @@ wxChmInputStream::CreateHHPStream()
|
||||
switch (code)
|
||||
{
|
||||
case 0: // CONTENTS_FILE
|
||||
tmp = "Contents file=";
|
||||
hhc=true;
|
||||
if (len)
|
||||
{
|
||||
tmp = "Contents file=";
|
||||
hhc=true;
|
||||
}
|
||||
break;
|
||||
case 1: // INDEX_FILE
|
||||
tmp = "Index file=";
|
||||
@@ -649,9 +652,10 @@ wxChmInputStream::CreateHHPStream()
|
||||
// LCID at position 0
|
||||
wxUint32 dummy = *((wxUint32 *)(structptr+0)) ;
|
||||
wxUint32 lcid = wxUINT32_SWAP_ON_BE( dummy ) ;
|
||||
wxString msg ;
|
||||
msg.Printf(wxT("Language=0x%X\r\n"),lcid) ;
|
||||
out->Write(msg.c_str() , msg.length() ) ;
|
||||
char msg[64];
|
||||
int len = sprintf(msg, "Language=0x%X\r\n", lcid) ;
|
||||
if (len > 0)
|
||||
out->Write(msg, len) ;
|
||||
}
|
||||
break ;
|
||||
default:
|
||||
@@ -848,7 +852,7 @@ wxFSFile* wxChmFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs),
|
||||
left + wxT("#chm:") + right,
|
||||
wxEmptyString,
|
||||
GetAnchor(location),
|
||||
wxDateTime(wxFileModificationTime(left)));
|
||||
wxDateTime(leftFilename.GetModificationTime()));
|
||||
}
|
||||
|
||||
delete s;
|
||||
|
Reference in New Issue
Block a user