From 05f2ae79b75d008dcde073d6581dfcf332e232b3 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 --- xwords4/linux/linuxdict.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xwords4/linux/linuxdict.c b/xwords4/linux/linuxdict.c index fdcdf9e7d..c1a5f833e 100644 --- a/xwords4/linux/linuxdict.c +++ b/xwords4/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,