mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
fix mempool tracking bug
This commit is contained in:
parent
8b26d6bc4e
commit
bf88c000b7
2 changed files with 5 additions and 1 deletions
|
@ -280,6 +280,10 @@ mpool_realloc( MemPoolCtx* mpool, void* ptr, XP_U32 newsize, const char* file,
|
|||
entry->fileName = file;
|
||||
entry->func = func;
|
||||
entry->lineNo = lineNo;
|
||||
mpool->curBytes += newsize - entry->size;
|
||||
if ( mpool->curBytes > mpool->maxBytes ) {
|
||||
mpool->maxBytes = mpool->curBytes;
|
||||
}
|
||||
entry->size = newsize;
|
||||
}
|
||||
result = entry->ptr;
|
||||
|
|
|
@ -518,7 +518,7 @@ showName( GameState* gs )
|
|||
Globals* globals = gs->globals;
|
||||
title = gs->gameName;
|
||||
char buf[64];
|
||||
if ( true || 1 < countDicts( globals ) ) {
|
||||
if ( 1 < countDicts( globals ) ) {
|
||||
char langName[32];
|
||||
if ( !langNameFor( globals, gs->gi.dictLang, langName, sizeof(langName) ) ) {
|
||||
strcpy( langName, "??" );
|
||||
|
|
Loading…
Reference in a new issue