fixed a crash bug in translation file loading where big files would reset the string cache and not update pointers
fixed a crash bug in translation file loading where big files would reset the string cache and not update pointers
1.1 --- a/core/Translator.cpp Wed Jun 06 16:40:30 2007 +0000
1.2 +++ b/core/Translator.cpp Wed Jun 06 17:34:16 2007 +0000
1.3 @@ -164,7 +164,12 @@
1.4
1.5 pPhrase->fmt_count = 0;
1.6 pPhrase->fmt_list = -1;
1.7 - pPhrase->trans_tbl = m_pMemory->CreateMem(sizeof(trans_t) * m_LangCount, (void **)&pTrans);
1.8 +
1.9 + int trans_tbl = m_pMemory->CreateMem(sizeof(trans_t) * m_LangCount, (void **)&pTrans);
1.10 + /* Update the pointer! */
1.11 + pPhrase = (phrase_t *)m_pMemory->GetAddress(m_CurPhrase);
1.12 + pPhrase->trans_tbl = trans_tbl;
1.13 +
1.14 pPhrase->translations = 0;
1.15 pPhrase->fmt_bytes = 0;
1.16