diff --git a/test/tools/ossfuzz/protoToYul.cpp b/test/tools/ossfuzz/protoToYul.cpp index 86a053e1d..cff7334f0 100644 --- a/test/tools/ossfuzz/protoToYul.cpp +++ b/test/tools/ossfuzz/protoToYul.cpp @@ -120,6 +120,8 @@ string ProtoConverter::visit(Literal const& _x) return "0x" + createHex(_x.hexval()); case Literal::kStrval: return "\"" + createAlphaNum(_x.strval()) + "\""; + case Literal::kBoolval: + return _x.boolval() ? "true" : "false"; case Literal::LITERAL_ONEOF_NOT_SET: return dictionaryToken(); } @@ -1170,6 +1172,8 @@ void ProtoConverter::visit(CaseStmt const& _x) if (noDoubleQuoteStr.empty()) yulAssert(literalVal == 0, "Proto fuzzer: Empty string does not evaluate to zero"); } + else if (_x.case_lit().has_boolval()) + literalVal = _x.case_lit().boolval() ? u256(1) : u256(0); else literalVal = u256(literal); diff --git a/test/tools/ossfuzz/yulProto.proto b/test/tools/ossfuzz/yulProto.proto index 129638e27..7d046747d 100644 --- a/test/tools/ossfuzz/yulProto.proto +++ b/test/tools/ossfuzz/yulProto.proto @@ -100,6 +100,7 @@ message Literal { uint64 intval = 1; string hexval = 2; string strval = 3; + bool boolval = 4; } }