From 8d4912f4afaa8febe92be363bec60e9342675466 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 14 Oct 2008 01:56:28 +0000 Subject: [PATCH] - Fixed: The three-argument version of AActor::FindState() initialized a two-entry array for passing to the main FindState() routine, but did not actually pass it, passing the original primary label instead. SVN r1261 (trunk) --- docs/rh-log.txt | 3 +++ src/actor.h | 4 ++-- src/p_states.cpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index aef713382..6de4707da 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ October 13, 2008 +- Fixed: The three-argument version of AActor::FindState() initialized a + two-entry array for passing to the main FindState() routine, but did + not actually pass it, passing the original primary label instead. - Fixed: SDL builds did not shutdown the sound system at exit. - Fixed: ThingCountSector and ThingCountNameSector did not remove enough entries from the stack, and did not put the result in the right slot. diff --git a/src/actor.h b/src/actor.h index 170235f38..fc01dac32 100644 --- a/src/actor.h +++ b/src/actor.h @@ -793,8 +793,8 @@ public: FState *FindState (FName label, FName sublabel, bool exact = false) const { - FName names[]={label, sublabel}; - return GetClass()->ActorInfo->FindState(2, &label, exact); + FName names[] = { label, sublabel }; + return GetClass()->ActorInfo->FindState(2, names, exact); } diff --git a/src/p_states.cpp b/src/p_states.cpp index 3ca914b3e..8fad65770 100644 --- a/src/p_states.cpp +++ b/src/p_states.cpp @@ -851,4 +851,4 @@ CCMD(dumpstates) DumpStateHelper(info->StateList, ""); Printf(PRINT_LOG, "----------------------------\n"); } -} \ No newline at end of file +}