Fishsanity's flag set handler was using GetFishLocations() functions, which return a new vector, as separate begin() and end() iterators, causing binary_search to search across two different vector objects, resulting in out of range errors and crashes. This fixes that by checking for RCTYPE_FISH at the beginning of GetCheckType() as well as changing GetCheckType() to a switch structure on rc's Location::GetScene() and getting rid of binary_search altogether.
This also fixes some code formatting (one if block wasn't indented, several unbracketed single-line if blocks), and fixes typedef warnings in fishsanity.h where the enum name needs to be after the block of enum values instead of before.
Fishsanity's flag set handler was using
GetFishLocations()
functions, which return a new vector, as separatebegin()
andend()
iterators, causingbinary_search
to search across two different vector objects, resulting in out of range errors and crashes. This fixes that by checking forRCTYPE_FISH
at the beginning ofGetCheckType()
as well as changingGetCheckType()
to a switch structure onrc
'sLocation::GetScene()
and getting rid ofbinary_search
altogether.This also fixes some code formatting (one if block wasn't indented, several unbracketed single-line if blocks), and fixes typedef warnings in
fishsanity.h
where the enum name needs to be after the block of enum values instead of before.Build Artifacts