From ec205c5a7b35d34d9b0f7cc3e5bf5353bae546df Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Sun, 23 Oct 2022 22:10:20 -0400 Subject: [PATCH] Remove null characters from Qt y/n prompt Fixes issue #566. --- win/Qt/qt_bind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/Qt/qt_bind.cpp b/win/Qt/qt_bind.cpp index d75e32dc8..34a78cdb1 100644 --- a/win/Qt/qt_bind.cpp +++ b/win/Qt/qt_bind.cpp @@ -703,7 +703,7 @@ char NetHackQtBind::qt_yn_function(const char *question_, int result = -1; if (choices) { - QString choicebuf((int) strlen(choices) + 1, QChar('\0')); + QString choicebuf; for (const char *p = choices; *p; ++p) { if (*p == '\033') // and anything beyond is hidden break; -- 2.50.1