]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/CMap.cpp
Mention that we are now using SDL2 in the manual and intro screen.
[quix0rs-blobwars.git] / src / CMap.cpp
index 5f60ad12bfdc789700714fc5bd903bdfc49ba915..5fc21e9c9b207084de307cc670095e9c866b8b18 100644 (file)
@@ -1,5 +1,6 @@
 /*
-Copyright (C) 2004 Parallel Realities
+Copyright (C) 2004-2011 Parallel Realities
+Copyright (C) 2011-2015 Perpendicular Dimensions
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -44,7 +45,7 @@ void Map::clear()
        limitRight = ((MAPWIDTH - 40) * BRICKSIZE);
        limitDown = ((MAPHEIGHT - 30) * BRICKSIZE);
 
-       strcpy(name, "");
+       name[0] = 0;
 
        for (int x = 0 ; x < MAPWIDTH ; x++)
                for (int y = 0 ; y < MAPHEIGHT ; y++)
@@ -220,7 +221,7 @@ void Map::destroyPersistant(const char *name)
                
                if (strcmp(p->stageName, name) == 0)
                {
-                       strcpy(p->stageName, "@none@");
+                       strlcpy(p->stageName, "@none@", sizeof p->stageName);
                        p->clear();
                        return;
                }
@@ -229,7 +230,7 @@ void Map::destroyPersistant(const char *name)
 
 void Map::setName(const char *name)
 {
-       strcpy(this->name, name);
+       strlcpy(this->name, name, sizeof this->name);
        
        if (strstr(name, "BioMech"))
        {