diff --git a/stella/src/gui/GameList.cxx b/stella/src/gui/GameList.cxx index 6847a0e1f..878dd853c 100644 --- a/stella/src/gui/GameList.cxx +++ b/stella/src/gui/GameList.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: GameList.cxx,v 1.2 2005-05-11 01:44:39 stephena Exp $ +// $Id: GameList.cxx,v 1.3 2005-05-11 23:06:52 stephena Exp $ // // Based on code from KStella - Stella frontend // Copyright (C) 2003-2005 Stephen Anthony @@ -47,6 +47,9 @@ void GameList::appendGame(const string& rom, const string& name, const string& n // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void GameList::sortByName() { + if(myArray.size() <= 1) + return; + // Simple selection sort for(uInt32 i = 0; i < myArray.size()-1; i++) { diff --git a/stella/src/gui/LauncherDialog.cxx b/stella/src/gui/LauncherDialog.cxx index 136f17328..1e96a503e 100644 --- a/stella/src/gui/LauncherDialog.cxx +++ b/stella/src/gui/LauncherDialog.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LauncherDialog.cxx,v 1.8 2005-05-11 19:36:00 stephena Exp $ +// $Id: LauncherDialog.cxx,v 1.9 2005-05-11 23:06:52 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -174,7 +174,7 @@ void LauncherDialog::updateListing(bool fullReload) else // we have no other choice loadListFromDisk(); */ - // Start with empty lists + // Start with empty list myGameList->clear(); string cacheFile = instance()->cacheFile(); @@ -301,7 +301,10 @@ string LauncherDialog::MD5FromFile(const string& path) uInt32 size = in.gcount(); in.close(); - return MD5(image, size); + string md5 = MD5(image, size); + delete[] image; + + return md5; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -