From a2f886c665343992008dc8d7c270e7d4f157557e Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Fri, 1 Sep 2017 18:49:43 +0100 Subject: [PATCH] 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. --- src/files.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.40.0