summaryrefslogtreecommitdiff
path: root/games/glaxium/patches
diff options
context:
space:
mode:
Diffstat (limited to 'games/glaxium/patches')
-rw-r--r--games/glaxium/patches/patch-fighter2.cpp15
-rw-r--r--games/glaxium/patches/patch-variables.cpp14
2 files changed, 29 insertions, 0 deletions
diff --git a/games/glaxium/patches/patch-fighter2.cpp b/games/glaxium/patches/patch-fighter2.cpp
new file mode 100644
index 00000000000..9a8e298e55c
--- /dev/null
+++ b/games/glaxium/patches/patch-fighter2.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-fighter2.cpp,v 1.1 2016/12/12 06:21:47 dholland Exp $
+
+Use right array size; avoid running off the end.
+
+--- fighter2.cpp~ 2002-10-04 18:05:20.000000000 +0000
++++ fighter2.cpp
+@@ -87,7 +87,7 @@ void Fighter2::initList()
+ }
+
+
+- for (i=0;i<587;i++) {
++ for (i=0;i<578;i++) {
+ fighter2_meshes[i*24+7] = 1 - fighter2_meshes[i*24+7];
+ fighter2_meshes[i*24+7+8] = 1 - fighter2_meshes[i*24+7+8];
+ fighter2_meshes[i*24+7+16] = 1 - fighter2_meshes[i*24+7+16];
diff --git a/games/glaxium/patches/patch-variables.cpp b/games/glaxium/patches/patch-variables.cpp
new file mode 100644
index 00000000000..32505143775
--- /dev/null
+++ b/games/glaxium/patches/patch-variables.cpp
@@ -0,0 +1,14 @@
+$NetBSD: patch-variables.cpp,v 1.1 2016/12/12 06:21:47 dholland Exp $
+
+Avoid undefined behavior.
+
+--- variables.cpp~ 2002-10-17 21:53:00.000000000 +0000
++++ variables.cpp
+@@ -453,6 +453,7 @@ char* GlaxiumVariables::getFullOptionsPa
+ static char strReturn[1024];
+ strcpy(strReturn, getenv("HOME"));
+ strcat(strReturn, "/.glaxiumrc");
++ return strReturn;
+ #endif
+ }
+