Fix FOPEN_MAX array bound error

This commit is contained in:
ceriel
1991-02-22 16:32:05 +00:00
parent 5c5cb8e5c8
commit 9340345509
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ fdopen(int fd, const char *mode)
if (fd < 0) return (FILE *)NULL;
for (i = 0; __iotab[i] != 0 ; i++)
if (i >= FOPEN_MAX)
if (i >= FOPEN_MAX-1)
return (FILE *)NULL;
switch(*mode++) {