From e5c28b4d7f8d85a20d4497bae3f5386fe4084d40 Mon Sep 17 00:00:00 2001 From: James Urquhart Date: Sat, 16 May 2015 14:57:40 +0100 Subject: [PATCH] Simplify buffer check when adding a registered variable --- Engine/source/console/consoleInternal.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Engine/source/console/consoleInternal.cpp b/Engine/source/console/consoleInternal.cpp index 49398d869..044e5238b 100644 --- a/Engine/source/console/consoleInternal.cpp +++ b/Engine/source/console/consoleInternal.cpp @@ -693,8 +693,7 @@ Dictionary::Entry* Dictionary::addVariable( const char *name, Entry *ent = add(StringTable->insert(name)); if ( ent->value.type <= ConsoleValue::TypeInternalString && - ent->value.sval != typeValueEmpty && - ent->value.type != ConsoleValue::TypeInternalStackString && ent->value.type != ConsoleValue::TypeInternalStringStackPtr ) + ent->value.bufferLen > 0 ) dFree(ent->value.sval); ent->value.type = type;