Skip to content

Commit 0debaf8

Browse files
committed
fix(core): fix HippyValue ToString crash
1 parent b65c4c8 commit 0debaf8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/footstone/src/hippy_value.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,9 @@ bool HippyValue::ToBooleanChecked() const {
428428

429429
bool HippyValue::ToString(std::string& str) const {
430430
bool is_string = IsString();
431-
str = str_;
431+
if (is_string) {
432+
str = str_;
433+
}
432434
return is_string;
433435
}
434436

0 commit comments

Comments
 (0)