st/oxr: Correct localized name validation

This commit is contained in:
Jakob Bornecrantz 2020-05-30 23:29:55 +01:00
parent a69cae7516
commit 6d61b9dec2
2 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,2 @@
OpenXR: Correct the return error code for action and action set localized name
validation.

View file

@ -110,12 +110,12 @@ oxr_verify_localized_name(struct oxr_logger *log,
}
if (string[0] == '\0') {
return oxr_error(log, XR_ERROR_NAME_INVALID,
return oxr_error(log, XR_ERROR_LOCALIZED_NAME_INVALID,
"(%s) can not be empty", name);
}
if (!contains_zero(string, array_size)) {
return oxr_error(log, XR_ERROR_NAME_INVALID,
return oxr_error(log, XR_ERROR_LOCALIZED_NAME_INVALID,
"(%s) must include zero termination '\\0'.",
name);
}