From 9e4b2fb3ecd64f8d29e5011ab1846fe9cbe744cd Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 11 Aug 2008 23:16:37 +0000 Subject: [PATCH] Fixed: The fix for GCC warnings in PowerupDuration would have caused incorrect error messages in case of incorrect use. SVN r1158 (trunk) --- src/thingdef/thingdef_properties.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index d6b4b321c9..9a057ad707 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -2232,7 +2232,6 @@ static void PowerupDuration (FScanner &sc, APowerupGiver *defaults, Baggage &bag { int *pEffectTics; - sc.MustGetNumber(); if (bag.Info->Class->IsDescendantOf(RUNTIME_CLASS(APowerup))) { @@ -2247,6 +2246,8 @@ static void PowerupDuration (FScanner &sc, APowerupGiver *defaults, Baggage &bag sc.ScriptError("\"%s\" requires an actor of type \"Powerup\"\n", sc.String); return; } + + sc.MustGetNumber(); *pEffectTics = (sc.Number >= 0) ? sc.Number : -sc.Number * TICRATE; }