From aaf88f9662278e805e66b6f3f94d866500b5a69a Mon Sep 17 00:00:00 2001 From: PatR Date: Fri, 2 Oct 2020 04:51:15 -0700 Subject: [PATCH] Qt build fix The failing Travis build issued about 500 lines of diagnostics when complaining about one line of the source. It compiled ok for me but I use older versions of Qt library and C++ compiler. --- win/Qt/qt_yndlg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/Qt/qt_yndlg.cpp b/win/Qt/qt_yndlg.cpp index a696fdb92..7ae167da2 100644 --- a/win/Qt/qt_yndlg.cpp +++ b/win/Qt/qt_yndlg.cpp @@ -295,8 +295,8 @@ char NetHackQtYnDialog::Exec() // present in the QLineEdit widget doesn't affect its isEmpty() test if (le && !le->text().isEmpty()) { QString text(le->text()); - if (text[0] == "#") - text = text.mid(1); + if (text.at(0) == QChar('#')) + text = text.mid(1); // rest of string past [0] ::yn_number = text.toLong(); choice = '#'; } -- 2.50.1