windows: Fix off-by-one error in strerror_s_extended()

This commit is contained in:
Tobias Brunner 2014-07-02 11:59:01 +02:00
parent 0026600bfe
commit e44223dbcc

View File

@ -362,7 +362,7 @@ int strerror_s_extended(char *buf, size_t buflen, int errnum)
};
int offset = EADDRINUSE;
if (errnum < offset || errnum > offset + countof(errstr))
if (errnum < offset || errnum >= offset + countof(errstr))
{
return strerror_s(buf, buflen, errnum);
}