Bugfix: Make Highscore working even at very first startup
git-svn-id: https://svn.code.sf.net/p/extremetuxracer/code/trunk@412 0420edf4-82e4-42fc-9478-35b55e6d67a3master
parent
238772eaee
commit
845e3995ff
|
@ -117,6 +117,8 @@ bool CScore::SaveHighScore () const {
|
|||
bool CScore::LoadHighScore () {
|
||||
CSPList list (520);
|
||||
|
||||
Scorelist.resize(Course.CourseList.size());
|
||||
|
||||
if (!list.Load (param.config_dir, "highscore")) {
|
||||
Message ("could not load highscore list");
|
||||
return false;
|
||||
|
@ -124,7 +126,6 @@ bool CScore::LoadHighScore () {
|
|||
|
||||
TScore score;
|
||||
|
||||
Scorelist.resize(Course.CourseList.size());
|
||||
for (size_t i=0; i<list.Count(); i++) {
|
||||
const string& line = list.Line(i);
|
||||
string course = SPStrN (line, "course", "unknown");
|
||||
|
|
Loading…
Reference in New Issue