mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
- fixed: An 'if' statement with only one branch may never considered to be always returning.
This commit is contained in:
parent
6414fd301b
commit
647fd53a15
1 changed files with 3 additions and 3 deletions
|
@ -7441,9 +7441,9 @@ ExpEmit FxIfStatement::Emit(VMFunctionBuilder *build)
|
|||
|
||||
bool FxIfStatement::CheckReturn()
|
||||
{
|
||||
//An if statement returns if both branches return, if present.
|
||||
return (WhenTrue == nullptr || WhenTrue->CheckReturn()) &&
|
||||
(WhenFalse == nullptr || WhenFalse->CheckReturn());
|
||||
//An if statement returns if both branches return. Both branches must be present.
|
||||
return WhenTrue != nullptr && WhenTrue->CheckReturn() &&
|
||||
WhenFalse != nullptr && WhenFalse->CheckReturn();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue