aboutsummaryrefslogtreecommitdiffstats
path: root/main/bsnes/nall-strlcpy.patch
blob: dd4a005a63451da7b90dee648a590e54f77bad39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- bsnes_v077-source/bsnes/snes/system/serialization.cpp
+++ bsnes_v077-source/bsnes/snes/system/serialization.cpp
@@ -7,7 +7,7 @@
   char profile[16], description[512];
   memset(&profile, 0, sizeof profile);
   memset(&description, 0, sizeof description);
-  strlcpy(profile, Info::Profile, sizeof profile);
+  nall::strlcpy(profile, Info::Profile, sizeof profile);
 
   s.integer(signature);
   s.integer(version);
--- bsnes_v077-source/bsnes/ui/tools/state-manager.cpp
+++ bsnes_v077-source/bsnes/ui/tools/state-manager.cpp
@@ -130,7 +130,7 @@
 string StateManager::slotLoadDescription(unsigned i) {
   if(slot[i].capacity() == 0) return "(empty)";
   char text[512];
-  strlcpy(text, (const char*)slot[i].data() + HeaderLength, 512);
+  nall::strlcpy(text, (const char*)slot[i].data() + HeaderLength, 512);
   return text;
 }
 
@@ -138,7 +138,7 @@
   if(stateList.selected() == false) return;
   string text = descEdit.text();
   if(slot[stateList.selection()].capacity() > 0) {
-    strlcpy((char*)slot[stateList.selection()].data() + HeaderLength, (const char*)text, 512);
+    nall::strlcpy((char*)slot[stateList.selection()].data() + HeaderLength, (const char*)text, 512);
   }
   refresh();
 }