Fix parameter to strncpy in powerup.cpp.
authorGwyn Ciesla <limburgher@gmail.com>
Thu, 26 Apr 2018 19:54:22 +0000 (14:54 -0500)
committerGwyn Ciesla <limburgher@gmail.com>
Thu, 26 Apr 2018 19:54:22 +0000 (14:54 -0500)
powerup.cpp

index 56bf36b..a7e41f2 100644 (file)
@@ -21,25 +21,25 @@ game_object powerup_init(game_object powerup, game_object object){
   int fodder = rand()%1500;
 
   if(fodder>=1200){
-    strncpy(powerup.line0, "M", 1);
+    strncpy(powerup.line0, "M", 2);
   };
   if(fodder>=1000&&fodder<1200){
-    strncpy(powerup.line0, "T", 1);
+    strncpy(powerup.line0, "T", 2);
   };
   if(fodder>=800&&fodder<1000){
-    strncpy(powerup.line0, "S", 1);
+    strncpy(powerup.line0, "S", 2);
   };
   if(fodder>=600&&fodder<800){
-    strncpy(powerup.line0, "K", 1);
+    strncpy(powerup.line0, "K", 2);
   };
   if(fodder>=400&&fodder<600){
-    strncpy(powerup.line0, "L", 1);
+    strncpy(powerup.line0, "L", 2);
   };
   if(fodder>=200&&fodder<400){
-    strncpy(powerup.line0, "B", 1);
+    strncpy(powerup.line0, "B", 2);
   };
   if(fodder<200){
-    strncpy(powerup.line0, "Z", 1);
+    strncpy(powerup.line0, "Z", 2);
   };
   
   return powerup;