diff options
author | William Pitcock <nenolod@dereferenced.org> | 2011-04-09 08:25:09 -0500 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2011-04-09 08:25:33 -0500 |
commit | 0381828da41f0c2d524f4bd2fed525b14c35c2d7 (patch) | |
tree | 7852e70772f460a8dfaa1afe9260a05dd4ef6b82 /main/bsnes/nall-strlcpy.patch | |
parent | 7c36be22a3475208e976eb31f382aa9004b31c13 (diff) | |
download | aports-0381828da41f0c2d524f4bd2fed525b14c35c2d7.tar.bz2 aports-0381828da41f0c2d524f4bd2fed525b14c35c2d7.tar.xz |
main/bsnes: move from testing
Diffstat (limited to 'main/bsnes/nall-strlcpy.patch')
-rw-r--r-- | main/bsnes/nall-strlcpy.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/main/bsnes/nall-strlcpy.patch b/main/bsnes/nall-strlcpy.patch new file mode 100644 index 0000000000..dd4a005a63 --- /dev/null +++ b/main/bsnes/nall-strlcpy.patch @@ -0,0 +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); + 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(); + } |