From f4a60f29f354e18d73f61dd53ca9eeee86a13d8e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 30 Nov 2015 09:21:45 +0100 Subject: [PATCH] - added missing sc.MustGetString() to 'optional' case of decal parser. --- src/decallib.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/decallib.cpp b/src/decallib.cpp index 14b824a7b7..784998977c 100644 --- a/src/decallib.cpp +++ b/src/decallib.cpp @@ -608,6 +608,7 @@ void FDecalLib::ParseGenerator (FScanner &sc) // Get name of generator (actor) sc.MustGetString (); optional = sc.Compare("optional"); + if (optional) sc.MustGetString(); type = PClass::FindClass (sc.String); if (type == NULL || type->ActorInfo == NULL) @@ -626,7 +627,7 @@ void FDecalLib::ParseGenerator (FScanner &sc) decal = ScanTreeForName (sc.String, Root); if (decal == NULL) { - sc.ScriptError ("%s has not been defined.", sc.String); + if (!optional) sc.ScriptError ("%s has not been defined.", sc.String); } } if (type != NULL)