From: teodor Date: Mon, 7 Jul 2008 16:56:22 +0000 (+0000) Subject: fix inaccurace memory count X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=20f2d732900dbb8cc6668af3c06d9da9006bb327;p=tedtools.git fix inaccurace memory count --- diff --git a/sfxstr.c b/sfxstr.c index 0697ba3..3429470 100644 --- a/sfxstr.c +++ b/sfxstr.c @@ -1194,8 +1194,8 @@ SFSInitFromDump(SFSTree *info, void *pointer, u_int64_t size, void **extradata, tlog(TL_CRIT|TL_EXIT, "sizeof(Opaque) mismatch"); if ( dh->headersize != SFSTDHSZ ) tlog(TL_CRIT|TL_EXIT, "Tree's header size mismatch (should be %d but %d bytes)", SFSTDHSZ, dh->headersize); - if ( size && size != dh->totalen + SFSTDHSZ ) - tlog(TL_CRIT|TL_EXIT, "Memory size mismatch (should be %d but %d bytes)", dh->totalen + SFSTDHSZ, size); + if ( size && size != dh->totalen + SFSTDHSZ + dh->extrasize ) + tlog(TL_CRIT|TL_EXIT, "Memory size mismatch (should be %d but %d bytes)", dh->totalen + SFSTDHSZ + dh->extrasize , size); info->totalen = dh->totalen; info->nnodes = dh->nnodes;