summaryrefslogtreecommitdiffstats
path: root/main/bsnes/nall-strlcpy.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-25 16:51:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-25 18:54:07 +0000
commitb5c0890914ac3debe6d569fdcd25c88d57ea6865 (patch)
tree1c0e2cc1787da1923dc6e2c88df938df135cec64 /main/bsnes/nall-strlcpy.patch
parentfb1ef2c33ecb16bc986503dd88414f8433bbe98d (diff)
downloadaports-b5c0890914ac3debe6d569fdcd25c88d57ea6865.tar.bz2
aports-b5c0890914ac3debe6d569fdcd25c88d57ea6865.tar.xz
main/bsnes: upgrade to 0.83
Diffstat (limited to 'main/bsnes/nall-strlcpy.patch')
-rw-r--r--main/bsnes/nall-strlcpy.patch44
1 files changed, 22 insertions, 22 deletions
diff --git a/main/bsnes/nall-strlcpy.patch b/main/bsnes/nall-strlcpy.patch
index dd4a005a6..fa0859d44 100644
--- a/main/bsnes/nall-strlcpy.patch
+++ b/main/bsnes/nall-strlcpy.patch
@@ -1,31 +1,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);
+--- ./bsnes/ui/tools/state-manager.cpp.orig
++++ ./bsnes/ui/tools/state-manager.cpp
+@@ -135,7 +135,7 @@
+ string StateManager::slotLoadDescription(unsigned n) {
+ if(slot[n].capacity() == 0) return "(empty)";
+ char text[DescriptionLength];
+- strlcpy(text, (const char*)slot[n].data() + HeaderLength, DescriptionLength);
++ nall::strlcpy(text, (const char*)slot[n].data() + HeaderLength, DescriptionLength);
return text;
}
-@@ -138,7 +138,7 @@
+@@ -143,7 +143,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);
+- strlcpy((char*)slot[stateList.selection()].data() + HeaderLength, (const char*)text, DescriptionLength);
++ nall::strlcpy((char*)slot[stateList.selection()].data() + HeaderLength, (const char*)text, DescriptionLength);
}
refresh();
}
+--- ./bsnes/snes/system/serialization.cpp.orig
++++ ./bsnes/snes/system/serialization.cpp
+@@ -7,7 +7,7 @@
+ char description[512], profile[16];
+ memset(&description, 0, sizeof description);
+ memset(&profile, 0, sizeof profile);
+- strlcpy(profile, Info::Profile, sizeof profile);
++ nall::strlcpy(profile, Info::Profile, sizeof profile);
+
+ s.integer(signature);
+ s.integer(version);