summaryrefslogtreecommitdiff
path: root/noncore/games
Side-by-side diff
Diffstat (limited to 'noncore/games') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/sfcave/sfcave.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/games/sfcave/sfcave.cpp b/noncore/games/sfcave/sfcave.cpp
index a6c92a0..516dc93 100644
--- a/noncore/games/sfcave/sfcave.cpp
+++ b/noncore/games/sfcave/sfcave.cpp
@@ -977,49 +977,49 @@ void SFCave :: loadReplay()
char *data = new char[length+1];
fread( data, 1, length, in );
// printf( "data - %s", data );
QString sep = " ";
QStringList list = QStringList::split( sep, QString( data ) );
// print it out
QStringList::Iterator it = list.begin();
currentSeed = (*it).toInt();
++it;
currentGameType = (*it).toInt();
++it;
currentGameDifficulty = (*it).toInt();
++it;
replayList.clear();
for ( ; it != list.end(); ++it )
{
int v = (*it).toInt();
replayList.append( new int( v ) );
}
- delete data;
+ delete [] data;
fclose( in );
printf( "Replay loaded from %s\n", QFile::encodeName(replayFile).data() );
}
//--------------- MENU CODE ---------------------
void SFCave :: handleMenuKeys( QKeyEvent *e )
{
switch( e->key() )
{
case Qt::Key_Down:
currentMenuOption[currentMenuNr] ++;
if ( menuOptions[currentMenuNr][currentMenuOption[currentMenuNr]] == "" )
currentMenuOption[currentMenuNr] = 0;
break;
case Qt::Key_Up:
currentMenuOption[currentMenuNr] --;
if ( currentMenuOption[currentMenuNr] < 0 )
currentMenuOption[currentMenuNr] = nrMenuOptions[currentMenuNr]-1;
break;
case Qt::Key_Left: