diff options
-rw-r--r-- | doc/HISTORY | 3 | ||||
-rw-r--r-- | lib/pmfileio.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/doc/HISTORY b/doc/HISTORY index 7297c09e..520c7f18 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -12,6 +12,9 @@ not yet BJH Release 10.58.00 pgmtexture: fix array bounds violations in various calculations. Always broken. + Windows/Mingw: fix bug: temporary file creation fails + consistently. Broken in 10.34. + Windows: compute program name correctly. xpmtoppm: Make it work on XPM with zero characters per pixel. diff --git a/lib/pmfileio.c b/lib/pmfileio.c index 075f53f6..c9a34533 100644 --- a/lib/pmfileio.c +++ b/lib/pmfileio.c @@ -148,7 +148,7 @@ mkstempx(char * const filenameBuffer) { rc = open(filenameBuffer, O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); - if (rc == 0) { + if (rc >= 0) { fd = rc; gotFile = TRUE; } else { |