From b1749fcd9c8db7da78d3c11ef850b42688f3a702 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sun, 25 Jan 2004 14:31:34 +0000 Subject: [PATCH] tweak dict-building sanity check --- linux/linuxdict.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/linux/linuxdict.c b/linux/linuxdict.c index fdcdf9e7d..c1a5f833e 100644 --- a/linux/linuxdict.c +++ b/linux/linuxdict.c @@ -237,13 +237,13 @@ initFromDictFile( LinuxDictionaryCtxt* dctx, char* fileName ) if ( dictLength > 0 ) { #ifdef DEBUG - dctx->super.numEdges = dictLength / 3; -#endif - -#ifdef NODE_CAN_4 +# ifdef NODE_CAN_4 + dctx->super.numEdges = dictLength / dctx->super.nodeSize; XP_ASSERT( (dictLength % dctx->super.nodeSize) == 0 ); -#else +# else + dctx->super.numEdges = dictLength / 3; XP_ASSERT( (dictLength % 3) == 0 ); +# endif #endif dctx->super.base = (array_edge*)XP_MALLOC( dctx->super.mpool,