]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/player.cpp
Don't link pak tool with SDL.
[quix0rs-blobwars.git] / src / player.cpp
index 6b7eb29290ae7e0b106f02c6f3ff752846786c4c..cc793b9faa67d9970c9c8275ecb096a54e425d4a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -56,7 +56,7 @@ int medalWorker(void *data)
        
        SDL_mutexV(medalServer.lock);
        
-       delete tname;
+       delete[] tname;
        
        return type;
 }
@@ -66,7 +66,7 @@ void presentPlayerMedal(const char *tname)
        // Copy the input, so that threading
        // doesn't trip us up!
        char *data = new char[128];
-       strncpy(data, tname, sizeof data);
+       strlcpy(data, tname, 128);
        
        SDL_Thread *thread = SDL_CreateThread(medalWorker, (void*)data);
        
@@ -429,7 +429,7 @@ void doPlayer()
                }
        }
        
-       #if !USEPAK
+       #if DEBUG
        if (engine.keyState[SDLK_1])
                player.currentWeapon = &weapon[WP_PISTOL];
        else if (engine.keyState[SDLK_2])