[ox/std] Make ox_atoi return an ox::Result
This commit is contained in:
4
deps/ox/src/ox/claw/read.cpp
vendored
4
deps/ox/src/ox/claw/read.cpp
vendored
@@ -49,7 +49,9 @@ Result<ClawHeader> readHeader(const char *buff, std::size_t buffLen) noexcept {
|
||||
return OxError(1);
|
||||
}
|
||||
hdr.typeName = typeName;
|
||||
hdr.typeVersion = ox_atoi(versionStr.c_str());
|
||||
if (auto r = ox_atoi(versionStr.c_str()); r.error == 0) {
|
||||
hdr.typeVersion = r.value;
|
||||
}
|
||||
hdr.data = buff;
|
||||
hdr.dataSize = buffLen;
|
||||
return hdr;
|
||||
|
Reference in New Issue
Block a user