# HG changeset patch # User unc0rr # Date 1213737921 0 # Node ID 4cbd91296df7722a5602d42786f49a3e2b2debed # Parent 990c8b12b01ad853b7779a179a53cdd0aa8dc383 Don't let updated hedgewars version to make errors due to old weapons.ini diff -r 990c8b12b01a -r 4cbd91296df7 QTfrontend/selectWeapon.cpp --- a/QTfrontend/selectWeapon.cpp Tue Jun 17 20:36:37 2008 +0000 +++ b/QTfrontend/selectWeapon.cpp Tue Jun 17 21:25:21 2008 +0000 @@ -74,7 +74,10 @@ QWidget(parent) { wconf = new QSettings(cfgdir->absolutePath() + "/weapons.ini", QSettings::IniFormat, this); - if (wconf->allKeys().empty()) { + + if(wconf->value("Default", "").toString().size() != cDefaultAmmoStore->size() - 10) + { + wconf->clear(); wconf->setValue("Default", cDefaultAmmoStore->mid(10)); }