From fdfee91b9fbdbc95c9ed7bbc0e9286c222fcaecf Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 3 Jan 2009 14:44:41 +0000 Subject: [PATCH] - Fixed: 'None' was no longer recognized as a NULL class name by the DECORATE parser. SVN r1347 (trunk) --- docs/rh-log.txt | 4 ++++ src/thingdef/thingdef_properties.cpp | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 4136eff9b..2155f6618 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,7 @@ +January 3, 2009 (Changes by Graf Zahl) +- Fixed: 'None' was no longer recognized as a NULL class name by the + DECORATE parser. + January 1, 2009 (Changes by Graf Zahl) - Added 'ininventory item, amount' option to SBARINFO to check for a minimum amount instead of mere presence in the inventory. diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index 4cb0e2b63..82b0d22be 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -77,8 +77,14 @@ //========================================================================== static const PClass *FindClassTentative(const char *name, const char *ancestor) { + // "" and "none" mean 'no class' + if (name == NULL || *name == 0 || !stricmp(name, "none")) + { + return NULL; + } + const PClass *anc = PClass::FindClass(ancestor); - assert(anc != NULL); // parent classes used here should always be natively defined + assert(anc != NULL); // parent classes used here should always be natively defined const PClass *cls = const_cast(anc)->FindClassTentative(name); assert (cls != NULL); // cls can not ne NULL here if (!cls->IsDescendantOf(anc))