From: Alex Smith Date: Fri, 1 Sep 2017 17:49:43 +0000 (+0100) Subject: Handle the case where we continue after locking a nonexistent file X-Git-Tag: NetHack-3.6.1_RC01~411 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2f886c665343992008dc8d7c270e7d4f157557e;p=nethack Handle the case where we continue after locking a nonexistent file The previous version of this would lead to big warnings and impossibles. This doesn't seem like a useful case, but it's still better to have better warning messages just in case it does happen. --- diff --git a/src/files.c b/src/files.c index 92bb10596..01ad0569f 100644 --- a/src/files.c +++ b/src/files.c @@ -1675,6 +1675,7 @@ int retryct; if (lockfd == -1) { HUP raw_printf("Cannot open file %s. Is NetHack installed correctly?", filename); + nesting--; return FALSE; } sflock.l_type = F_WRLCK;