eina: Resolve string comparison from strerror_s when no code is returned
On Windows, `strerror_s` doesn't return the error code with the error message string as `strerror_r` on Linux does. So we do not compare the last space before the error code, comparing 13 characters instead of 14. Thus comparing for "Unknown error" correctly for all platforms.
This commit is contained in:
parent
abcb324c2d
commit
1e22a1b90b
|
@ -355,7 +355,7 @@ eina_error_msg_get(Eina_Error error)
|
|||
EINA_SAFETY_ERROR("strerror_r() failed");
|
||||
else
|
||||
{
|
||||
if (strncmp(str, unknown_prefix, sizeof(unknown_prefix) -1) == 0)
|
||||
if (strncmp(str, unknown_prefix, sizeof(unknown_prefix) - 2) == 0)
|
||||
msg = NULL;
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue