github pull request #909 - Qt yn prompt
Pull request from chasonr: remove NUL characters from constructed prompt for Qt_yn_function(). I couldn't see any with Qt 5.11 on OSX 10.11.6, but with some font(s) or Qt newer versions they were visible as reported in issue #566 about 15 months ago. Closes #909
This commit is contained in:
@@ -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') // <esc> and anything beyond is hidden
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user