diff --git a/win/Qt/qt_msg.cpp b/win/Qt/qt_msg.cpp index 0c995cd97..f61549d81 100644 --- a/win/Qt/qt_msg.cpp +++ b/win/Qt/qt_msg.cpp @@ -100,7 +100,7 @@ const char * NetHackQtMessageWindow::GetStr(bool init) QListWidgetItem *item = list->item(currgetmsg++); if (item) { QString str = item->text(); - if (str.toLatin1().length() < (int) sizeof historybuf - 1) { + if (str.toLatin1().length() < (int) sizeof historybuf) { return strcpy(historybuf, str.toLatin1().constData()); //raw_printf("getstr[%d]='%s'", currgetmsg, result); }