summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/errors.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/errors.c b/Python/errors.c
index 71e51c3..b3e1910 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -308,7 +308,7 @@ PyErr_SetFromErrnoWithFilename(exc, filename)
table, we use it, otherwise we assume it really _is_
a Win32 error code
*/
- if (i < _sys_nerr) {
+ if (i > 0 && i < _sys_nerr) {
s = _sys_errlist[i];
}
else {