Qt: fix infinite loop when gui_recent_files_count_max is negative

Change-Id: I7cfddd865ebe0cd01230e19bf20fee7964c40324
Reviewed-on: https://code.wireshark.org/review/13155
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Peter Wu 2016-01-09 19:32:27 +01:00 committed by Anders Broman
parent 25bfbaa0cf
commit 174dc98892
1 changed files with 1 additions and 1 deletions

View File

@ -317,7 +317,7 @@ void MainWelcome::updateRecentFiles() {
rfRow++;
}
while (recent_files_->count() > (int) prefs.gui_recent_files_count_max) {
while ((unsigned)recent_files_->count() > prefs.gui_recent_files_count_max) {
recent_files_->takeItem(recent_files_->count());
}
if (recent_files_->count() > 0) {