MCPcopy Create free account
hub / github.com/ElementsProject/elements / LegacyParseUInt8

Function LegacyParseUInt8

src/test/fuzz/string.cpp:98–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98bool LegacyParseUInt8(const std::string& str, uint8_t* out)
99{
100 uint32_t u32;
101 if (!LegacyParseUInt32(str, &u32) || u32 > std::numeric_limits<uint8_t>::max()) {
102 return false;
103 }
104 if (out != nullptr) {
105 *out = static_cast<uint8_t>(u32);
106 }
107 return true;
108}
109
110bool LegacyParseUInt64(const std::string& str, uint64_t* out)
111{

Callers 1

FUZZ_TARGETFunction · 0.85

Calls 1

LegacyParseUInt32Function · 0.85

Tested by

no test coverage detected