From 867726d87085c3cf4de3d3a2ec8dfadffb8d7a2d Mon Sep 17 00:00:00 2001
From: KlzXS <klzx+github@klzx.cf>
Date: Wed, 25 Jan 2023 18:56:48 +0100
Subject: [PATCH] Add debug message for bad call

---
 src/nnn.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/nnn.c b/src/nnn.c
index d186e5aa..9818c347 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -4451,8 +4451,10 @@ static bool get_output(char *file, char *arg1, char *arg2, int fdout, bool page)
 	 * to close it, the caller must do it. We don't even know the path to pass to the pager and
 	 * it's a real hassle to get it. In general this just invites problems so we are blocking it.
 	 */
-	if (have_file && page)
+	if (have_file && page) {
+		DPRINTF_S("invalid get_ouptput() call");
 		return FALSE;
+	}
 
 	/* Setup file descriptors for child command */
 	if (!have_file && page) {
-- 
2.51.0