1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Fix dump of null items (#459)

Co-authored-by: Andrey Tvorozhkov <andrey@h-labs.ru>
This commit is contained in:
Andrey Tvorozhkov 2022-09-15 09:37:27 +03:00 committed by GitHub
parent e40d323fce
commit bd5f4f61ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,15 +90,27 @@ void StackEntry::dump(std::ostream& os) const {
os << dec_string(as_int());
break;
case t_cell:
os << "C{" << static_cast<Ref<Cell>>(ref)->get_hash().to_hex() << "}";
if (ref.not_null()) {
os << "C{" << static_cast<Ref<Cell>>(ref)->get_hash().to_hex() << "}";
} else {
os << "C{null}";
}
break;
case t_builder:
os << "BC{" << static_cast<Ref<CellBuilder>>(ref)->to_hex() << "}";
if (ref.not_null()) {
os << "BC{" << static_cast<Ref<CellBuilder>>(ref)->to_hex() << "}";
} else {
os << "BC{null}";
}
break;
case t_slice: {
os << "CS{";
static_cast<Ref<CellSlice>>(ref)->dump(os, 1, false);
os << '}';
if (ref.not_null()) {
os << "CS{";
static_cast<Ref<CellSlice>>(ref)->dump(os, 1, false);
os << '}';
} else {
os << "CS{null}";
}
break;
}
case t_string: