fixed a crash bug in translation file loading where big files would reset the string cache and not update pointers

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40893
This commit is contained in:
David Anderson 2007-06-06 17:34:16 +00:00
parent 1b6b0f6c5e
commit 8303b79ef7

View File

@ -164,7 +164,12 @@ SMCParseResult CPhraseFile::ReadSMC_NewSection(const char *name, bool opt_quotes
pPhrase->fmt_count = 0;
pPhrase->fmt_list = -1;
pPhrase->trans_tbl = m_pMemory->CreateMem(sizeof(trans_t) * m_LangCount, (void **)&pTrans);
int trans_tbl = m_pMemory->CreateMem(sizeof(trans_t) * m_LangCount, (void **)&pTrans);
/* Update the pointer! */
pPhrase = (phrase_t *)m_pMemory->GetAddress(m_CurPhrase);
pPhrase->trans_tbl = trans_tbl;
pPhrase->translations = 0;
pPhrase->fmt_bytes = 0;