mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +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->fileName = file;
|
||||||
entry->func = func;
|
entry->func = func;
|
||||||
entry->lineNo = lineNo;
|
entry->lineNo = lineNo;
|
||||||
|
mpool->curBytes += newsize - entry->size;
|
||||||
|
if ( mpool->curBytes > mpool->maxBytes ) {
|
||||||
|
mpool->maxBytes = mpool->curBytes;
|
||||||
|
}
|
||||||
entry->size = newsize;
|
entry->size = newsize;
|
||||||
}
|
}
|
||||||
result = entry->ptr;
|
result = entry->ptr;
|
||||||
|
|
|
@ -518,7 +518,7 @@ showName( GameState* gs )
|
||||||
Globals* globals = gs->globals;
|
Globals* globals = gs->globals;
|
||||||
title = gs->gameName;
|
title = gs->gameName;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
if ( true || 1 < countDicts( globals ) ) {
|
if ( 1 < countDicts( globals ) ) {
|
||||||
char langName[32];
|
char langName[32];
|
||||||
if ( !langNameFor( globals, gs->gi.dictLang, langName, sizeof(langName) ) ) {
|
if ( !langNameFor( globals, gs->gi.dictLang, langName, sizeof(langName) ) ) {
|
||||||
strcpy( langName, "??" );
|
strcpy( langName, "??" );
|
||||||
|
|
Loading…
Reference in a new issue