Error: Fix errno resolving on Win32

This commit is contained in:
Stenzek 2023-09-17 00:51:07 +10:00
parent dd1a00674d
commit 6bfd498e31

View file

@ -33,7 +33,7 @@ void Error::SetErrno(int err)
#ifdef _MSC_VER
char buf[128];
if (strerror_s(buf, sizeof(buf), err) != 0)
if (strerror_s(buf, sizeof(buf), err) == 0)
m_description = fmt::format("errno {}: {}", err, buf);
else
m_description = fmt::format("errno {}: <Could not get error message>", err);