]> granicus.if.org Git - nethack/commitdiff
show errno not result
authornethack.allison <nethack.allison>
Sat, 13 Sep 2003 17:11:20 +0000 (17:11 +0000)
committernethack.allison <nethack.allison>
Sat, 13 Sep 2003 17:11:20 +0000 (17:11 +0000)
open_levelfile_exclusively() was showing the return value -1 in a panic message, even though that was the only possible value; show errno instead

doc/fixes34.3
src/files.c

index 8c4b0ce8ade1ca0a811e0da93d5fe17eab01c417..1767603267402566f80df77c2843dc444ce82285 100644 (file)
@@ -21,6 +21,8 @@ do not pacify shopkeeper when the hero enters a shop if that hero previously
        angered the shopkeeper without ever visibly entering the shop
 attempting to place migrating monsters onto a monster-saturated level no
        longer triggers impossible()
+open_levelfile_exclusively() was showing the return value -1 in a panic message,
+       even though that was the only possible value; show errno instead
 
 
 Platform- and/or Interface-Specific Fixes
index 5a94a16d14b054812cc4e02aba03440cf3586f0e..7a4f78c5a32ceb9ab9ec557a7fc32c490b1aff65 100644 (file)
@@ -550,7 +550,7 @@ int lev, oflag;
                        fd = lftrack.fd;
                        reslt = lseek(fd, 0L, SEEK_SET);
                        if (reslt == -1L)
-                           panic("open_levelfile_exclusively: lseek failed %d", reslt);
+                           panic("open_levelfile_exclusively: lseek failed %d", errno);
                        lftrack.nethack_thinks_it_is_open = TRUE;
                } else {
                        really_close();