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