Avoid possible (but not really possible) overrun that annoys gcc

master
Beq 2023-07-23 20:03:35 +01:00
parent 766bdb466d
commit 1b1a490bb2
1 changed files with 7 additions and 0 deletions

View File

@ -481,6 +481,13 @@ ERlvCmdRet RlvHandler::processCommand(std::reference_wrapper<const RlvCommand> r
case RLV_TYPE_ADD: // Checked: 2009-11-26 (RLVa-1.1.0f) | Modified: RLVa-1.1.0f
{
ERlvBehaviour eBhvr = rlvCmd.get().getBehaviourType();
if(eBhvr == RLV_BHVR_UNKNOWN)
{
eRet = RLV_RET_FAILED_PARAM;
RLV_DEBUGS << "\t- " << rlvCmd.get().getBehaviour() << " is UNKNOWN => Call Kitty!" << RLV_ENDL;
break;
}
if ( (m_Behaviours[eBhvr]) && ( (RLV_BHVR_SETCAM == eBhvr) || (RLV_BHVR_SETDEBUG == eBhvr) || (RLV_BHVR_SETENV == eBhvr) ) )
{
// Some restrictions can only be held by one single object to avoid deadlocks