[ox] Fix Mac build and fix MC to increment field counter on empty string
(synced from 819959745d)
This commit is contained in:
+2
-1
@@ -225,12 +225,13 @@ Error MetalClawReader::field(const char*, Handler handler) {
|
||||
template<typename T>
|
||||
Error MetalClawReader::field(const char* name, ox::Vector<T> *val) {
|
||||
if (m_unionIdx == -1 || m_unionIdx == m_field) {
|
||||
// set size of val if the field is present, don't worry about it if not
|
||||
if (m_fieldPresence.get(m_field)) {
|
||||
const auto [len, err] = arrayLength(name, false);
|
||||
oxReturnError(err);
|
||||
val->resize(len);
|
||||
return field(name, val->data(), val->size());
|
||||
}
|
||||
return field(name, val->data(), val->size());
|
||||
}
|
||||
return OxError(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user