]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/switches.cpp
Don't link pak tool with SDL.
[quix0rs-blobwars.git] / src / switches.cpp
index 96d74d9dc9b27010966994496865a6ab00e3013d..dafdeb25193144538f84ca87b4b045d20d7b1679 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
@@ -25,7 +25,7 @@ void checkSwitchContact(Entity *ent)
        Switch *swt = (Switch*)map.switchList.getHead();
        bool okayToActivate = false;
 
-       char message[100];
+       char message[256];
 
        while (swt->next != NULL)
        {
@@ -65,11 +65,11 @@ void checkSwitchContact(Entity *ent)
                                        
                                        if (swt->type == SWT_PRESSURE)
                                        {
-                                               strncpy(swt->requiredObjectName, "@none@", sizeof swt->requiredObjectName);
+                                               strlcpy(swt->requiredObjectName, "@none@", sizeof swt->requiredObjectName);
                                        }
                                        
                                        checkObjectives(swt->name, true);
-                                       strncpy(swt->name, "Switch", sizeof swt->name);
+                                       strlcpy(swt->name, "Switch", sizeof swt->name);
                                }
                                else
                                {