dep/rcheevos: Update to ffddcdb
This commit is contained in:
@ -419,6 +419,18 @@ int rc_json_get_required_unum_array(unsigned** entries, unsigned* num_entries, r
|
||||
}
|
||||
|
||||
int rc_json_get_required_array(unsigned* num_entries, rc_json_field_t* array_field, rc_api_response_t* response, const rc_json_field_t* field, const char* field_name) {
|
||||
#ifndef NDEBUG
|
||||
if (strcmp(field->name, field_name) != 0)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
if (!rc_json_get_optional_array(num_entries, array_field, response, field, field_name))
|
||||
return rc_json_missing_field(response, field);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int rc_json_get_optional_array(unsigned* num_entries, rc_json_field_t* array_field, rc_api_response_t* response, const rc_json_field_t* field, const char* field_name) {
|
||||
#ifndef NDEBUG
|
||||
if (strcmp(field->name, field_name) != 0)
|
||||
return 0;
|
||||
@ -428,7 +440,7 @@ int rc_json_get_required_array(unsigned* num_entries, rc_json_field_t* array_fie
|
||||
|
||||
if (!field->value_start || *field->value_start != '[') {
|
||||
*num_entries = 0;
|
||||
return rc_json_missing_field(response, field);
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy(array_field, field, sizeof(*array_field));
|
||||
|
||||
Reference in New Issue
Block a user