From dfbaa901c29aa8640a7549acc3e2de248e2ac8ec Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Wed, 6 Nov 2002 19:55:04 +0000 Subject: [PATCH] Replaced assert by simple if + warning message for too long symbols. --- programs/winedbg/hash.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/programs/winedbg/hash.c b/programs/winedbg/hash.c index dc6f3b937a4..92e1f0eaf7f 100644 --- a/programs/winedbg/hash.c +++ b/programs/winedbg/hash.c @@ -389,10 +389,13 @@ enum get_sym_val DEBUG_GetSymbolValue( const char * name, { char buffer[512]; - assert(strlen(name) < sizeof(buffer) - 2); /* one for '_', one for '\0' */ - buffer[0] = '_'; - strcpy(buffer + 1, name); - num = DEBUG_GSV_Helper(buffer, lineno, value, NUMDBGV, bp_flag); + if (strlen(name) < sizeof(buffer) - 2) /* one for '_', one for '\0' */ + { + buffer[0] = '_'; + strcpy(buffer + 1, name); + num = DEBUG_GSV_Helper(buffer, lineno, value, NUMDBGV, bp_flag); + } + else DEBUG_Printf(DBG_CHN_WARN, "Way too long symbol (%s)\n", name); } /* now get the local symbols if any */