git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18645
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
-#define CURRENT_CACHED_BOOK_VERSION 3
+#define CURRENT_CACHED_BOOK_VERSION 4
+
+// Additional flags to detect incompatibilities of the runtime environment:
+#define CACHED_BOOK_FORMAT_FLAGS \
+ (wxUSE_UNICODE << 0)
+
bool wxHtmlHelpData::LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f)
{
bool wxHtmlHelpData::LoadCachedBook(wxHtmlBookRecord *book, wxInputStream *f)
{
+ if (CacheReadInt32(f) != CACHED_BOOK_FORMAT_FLAGS)
+ return FALSE;
+
/* load contents : */
st = m_ContentsCnt;
m_ContentsCnt += CacheReadInt32(f);
/* load contents : */
st = m_ContentsCnt;
m_ContentsCnt += CacheReadInt32(f);
/* save header - version info : */
CacheWriteInt32(f, CURRENT_CACHED_BOOK_VERSION);
/* save header - version info : */
CacheWriteInt32(f, CURRENT_CACHED_BOOK_VERSION);
+ CacheWriteInt32(f, CACHED_BOOK_FORMAT_FLAGS);
/* save contents : */
for (cnt = 0, i = 0; i < m_ContentsCnt; i++)
/* save contents : */
for (cnt = 0, i = 0; i < m_ContentsCnt; i++)