mirror of
https://github.com/zeek/zeek.git
synced 2025-10-01 22:28:20 +00:00
gen-zam: fix for generating relational operations with first operand being a constant
This commit is contained in:
parent
f9385ef88d
commit
aee70af743
1 changed files with 6 additions and 1 deletions
|
@ -1684,7 +1684,12 @@ void ZAM_RelationalExprOpTemplate::BuildInstruction(const vector<ZAM_OperandType
|
|||
op1 = "n1";
|
||||
}
|
||||
else
|
||||
op1 = "n2";
|
||||
{
|
||||
if ( ot[1] == ZAM_OT_CONSTANT )
|
||||
op1 = "c";
|
||||
else
|
||||
op1 = "n2";
|
||||
}
|
||||
|
||||
auto type_suffix = zc == ZIC_VEC ? "->Yield();" : ";";
|
||||
Emit("auto t = " + op1 + "->GetType()" + type_suffix);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue