Skip to content

Commit b3c44c9

Browse files
karelbilekJohn Newbery
authored andcommitted
Pushing boolean value to univalue correctly
1 parent 07947ff commit b3c44c9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/univalue.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ class UniValue {
130130
UniValue tmpVal(val_);
131131
return pushKV(key, tmpVal);
132132
}
133+
bool pushKV(const std::string& key, bool val_) {
134+
UniValue tmpVal((bool)val_);
135+
return pushKV(key, tmpVal);
136+
}
133137
bool pushKV(const std::string& key, int val_) {
134138
UniValue tmpVal((int64_t)val_);
135139
return pushKV(key, tmpVal);

0 commit comments

Comments
 (0)