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:
parent
e40d323fce
commit
bd5f4f61ac
1 changed files with 17 additions and 5 deletions
|
@ -90,15 +90,27 @@ void StackEntry::dump(std::ostream& os) const {
|
||||||
os << dec_string(as_int());
|
os << dec_string(as_int());
|
||||||
break;
|
break;
|
||||||
case t_cell:
|
case t_cell:
|
||||||
|
if (ref.not_null()) {
|
||||||
os << "C{" << static_cast<Ref<Cell>>(ref)->get_hash().to_hex() << "}";
|
os << "C{" << static_cast<Ref<Cell>>(ref)->get_hash().to_hex() << "}";
|
||||||
|
} else {
|
||||||
|
os << "C{null}";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case t_builder:
|
case t_builder:
|
||||||
|
if (ref.not_null()) {
|
||||||
os << "BC{" << static_cast<Ref<CellBuilder>>(ref)->to_hex() << "}";
|
os << "BC{" << static_cast<Ref<CellBuilder>>(ref)->to_hex() << "}";
|
||||||
|
} else {
|
||||||
|
os << "BC{null}";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case t_slice: {
|
case t_slice: {
|
||||||
|
if (ref.not_null()) {
|
||||||
os << "CS{";
|
os << "CS{";
|
||||||
static_cast<Ref<CellSlice>>(ref)->dump(os, 1, false);
|
static_cast<Ref<CellSlice>>(ref)->dump(os, 1, false);
|
||||||
os << '}';
|
os << '}';
|
||||||
|
} else {
|
||||||
|
os << "CS{null}";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case t_string:
|
case t_string:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue