aboutsummaryrefslogtreecommitdiff
path: root/games/openbor4432
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2017-05-10 02:32:29 +0000
committerJan Beich <jbeich@FreeBSD.org>2017-05-10 02:32:29 +0000
commitfdf3fa67c322dd15b4259823a572a96c5f20a1fa (patch)
treed0f2db234932b3b64f3aab5dbab7a1589278eae2 /games/openbor4432
parent8e040e9d109dbbe352d6da23a65db4faaf8eae69 (diff)
downloadports-fdf3fa67c322dd15b4259823a572a96c5f20a1fa.tar.gz
ports-fdf3fa67c322dd15b4259823a572a96c5f20a1fa.zip
games/openbor: oops, make sure patch(1) doesn't confuse context
Notes
Notes: svn path=/head/; revision=440523
Diffstat (limited to 'games/openbor4432')
-rw-r--r--games/openbor4432/files/patch-openbor.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/games/openbor4432/files/patch-openbor.c b/games/openbor4432/files/patch-openbor.c
index 1cab90006f74..c02af986c7f8 100644
--- a/games/openbor4432/files/patch-openbor.c
+++ b/games/openbor4432/files/patch-openbor.c
@@ -4,7 +4,12 @@ Avoid accidental rounding from abs()
--- openbor.c.orig 2016-12-22 13:02:02 UTC
+++ openbor.c
-@@ -5810,7 +5810,7 @@ s_collision_attack **collision_alloc_att
+@@ -5821,17 +5821,17 @@ s_collision_attack *collision_alloc_attack_instance(s_
+ //
+ // Allocate an empty collision attack list.
+ s_collision_attack **collision_alloc_attack_list()
+ {
+ s_collision_attack **result;
size_t alloc_size;
// Get amount of memory we'll need.
@@ -13,7 +18,17 @@ Avoid accidental rounding from abs()
// Allocate memory and get pointer.
result = malloc(alloc_size);
-@@ -5859,7 +5859,7 @@ s_collision_body **collision_alloc_body_
+
+ // Make sure the list is blank.
+ memset(result, 0, alloc_size);
+
+ // return result.
+@@ -5870,17 +5870,17 @@ s_collision_body *collision_alloc_body_instance(s_coll
+ //
+ // Allocate an empty collision attack list.
+ s_collision_body **collision_alloc_body_list()
+ {
+ s_collision_body **result;
size_t alloc_size;
// Get amount of memory we'll need.
@@ -22,6 +37,11 @@ Avoid accidental rounding from abs()
// Allocate memory and get pointer.
result = malloc(alloc_size);
+
+ // Make sure the list is blank.
+ memset(result, 0, alloc_size);
+
+ // return result.
@@ -8204,7 +8204,8 @@ size_t lcmScriptCopyBuffer(ArgList *argl
size_t lcmScriptDeleteMain(char **buf)