File tree Expand file tree Collapse file tree
ICSharpCode.Decompiler/CSharp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2203,11 +2203,11 @@ protected internal override TranslatedExpression VisitIfInstruction(IfInstructio
22032203 BinaryOperatorType op = BinaryOperatorType . Any ;
22042204 TranslatedExpression rhs = default ( TranslatedExpression ) ;
22052205
2206- if ( inst . MatchLogicAnd ( out var lhsInst , out var rhsInst ) ) {
2206+ if ( inst . MatchLogicAnd ( out var lhsInst , out var rhsInst ) && ! rhsInst . MatchLdcI4 ( 1 ) ) {
22072207 op = BinaryOperatorType . ConditionalAnd ;
22082208 Debug . Assert ( rhsInst == inst . TrueInst ) ;
22092209 rhs = trueBranch ;
2210- } else if ( inst . MatchLogicOr ( out lhsInst , out rhsInst ) ) {
2210+ } else if ( inst . MatchLogicOr ( out lhsInst , out rhsInst ) && ! rhsInst . MatchLdcI4 ( 0 ) ) {
22112211 op = BinaryOperatorType . ConditionalOr ;
22122212 Debug . Assert ( rhsInst == inst . FalseInst ) ;
22132213 rhs = falseBranch ;
You can’t perform that action at this time.
0 commit comments