forked from Lainports/freebsd-ports
parent
8c099b1e91
commit
ddacb91075
4 changed files with 14 additions and 63 deletions
|
|
@ -1,8 +1,8 @@
|
|||
PORTNAME= openbor
|
||||
# Hint: svn revision is git rev-list --count ${GH_TAGNAME}
|
||||
PORTVERSION?= 7138
|
||||
PORTVERSION?= 7534
|
||||
.ifndef PKGNAMESUFFIX
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 0
|
||||
.endif
|
||||
CATEGORIES= games
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ PORTSCOUT= ignore:1
|
|||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= DCurrent
|
||||
GH_TAGNAME?= 3caaddd5
|
||||
GH_TAGNAME?= 3bae1dd7
|
||||
|
||||
USES+= cpe gmake pkgconfig sdl
|
||||
.if ${PORTVERSION} < 4433
|
||||
|
|
@ -45,7 +45,7 @@ USE_CSTD= gnu89
|
|||
.endif
|
||||
.if ${PORTVERSION} < 4108
|
||||
USE_SDL= gfx
|
||||
.elif ${PORTVERSION} < 6639
|
||||
.elif ${PORTVERSION} < 6639 || ${PORTVERSION} >= 7416
|
||||
USE_SDL= gfx2
|
||||
.else
|
||||
USE_SDL= sdl2
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1626732659
|
||||
SHA256 (DCurrent-openbor-7138-3caaddd5_GH0.tar.gz) = 4671f869aeffb0a13fd21171bbccef2dcca5b5b0c8f5a64bf2a921bc7404fac5
|
||||
SIZE (DCurrent-openbor-7138-3caaddd5_GH0.tar.gz) = 26900809
|
||||
TIMESTAMP = 1704177264
|
||||
SHA256 (DCurrent-openbor-7534-3bae1dd7_GH0.tar.gz) = 9ac7c3d9dae326e366c2202d33ffe7cc2ae39aec98fda738964e05467a6ccae1
|
||||
SIZE (DCurrent-openbor-7534-3bae1dd7_GH0.tar.gz) = 60292766
|
||||
|
|
|
|||
|
|
@ -1,47 +1,8 @@
|
|||
Fix potential crashes found by ASan/Clang/GCC
|
||||
Fix an infinite loop in lcmScriptDeleteMain()
|
||||
|
||||
--- openbor.c.orig 2018-07-06 15:13:16 UTC
|
||||
--- openbor.c.orig 2024-01-02 00:04:19 UTC
|
||||
+++ openbor.c
|
||||
@@ -6259,17 +6259,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.
|
||||
- alloc_size = sizeof(*result);
|
||||
+ alloc_size = max_collisons * sizeof(*result);
|
||||
|
||||
// Allocate memory and get pointer.
|
||||
result = malloc(alloc_size);
|
||||
|
||||
// Make sure the list is blank.
|
||||
memset(result, 0, alloc_size);
|
||||
|
||||
// return result.
|
||||
@@ -6308,17 +6308,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.
|
||||
- alloc_size = sizeof(*result);
|
||||
+ alloc_size = max_collisons * sizeof(*result);
|
||||
|
||||
// Allocate memory and get pointer.
|
||||
result = malloc(alloc_size);
|
||||
|
||||
// Make sure the list is blank.
|
||||
memset(result, 0, alloc_size);
|
||||
|
||||
// return result.
|
||||
@@ -8743,7 +8743,8 @@ size_t lcmScriptCopyBuffer(ArgList *arglist, char *buf
|
||||
@@ -12499,7 +12499,8 @@ size_t lcmScriptDeleteMain(char **buf)
|
||||
|
||||
size_t lcmScriptDeleteMain(char **buf)
|
||||
{
|
||||
|
|
@ -51,15 +12,3 @@ Fix an infinite loop in lcmScriptDeleteMain()
|
|||
ptrdiff_t pos = 0;
|
||||
char *newbuf = NULL;
|
||||
|
||||
@@ -15920,6 +15921,11 @@ void bar(int x, int y, int value, int maxvalue, s_bars
|
||||
else
|
||||
{
|
||||
return;
|
||||
+ }
|
||||
+
|
||||
+ if (value < 0)
|
||||
+ {
|
||||
+ value = 0;
|
||||
}
|
||||
|
||||
if (value > maxvalue)
|
||||
|
|
|
|||
|
|
@ -6,14 +6,16 @@ source/utils.c:303:64: error: member reference base type 'int' is not a structur
|
|||
writeToLogFile("Memory usage at exit: %u\n", mallinfo().arena);
|
||||
~~~~~~~~~~^~~~~~
|
||||
|
||||
--- source/utils.c.orig 2018-07-06 15:13:16 UTC
|
||||
--- source/utils.c.orig 2024-01-02 00:04:19 UTC
|
||||
+++ source/utils.c
|
||||
@@ -303,7 +303,7 @@ void *checkAlloc(void *ptr, size_t size, const char *f
|
||||
@@ -303,9 +303,7 @@ void *checkAlloc(void *ptr, size_t size, const char *f
|
||||
"\n* Shutting Down *\n\n");
|
||||
writeToLogFile("Out of memory!\n");
|
||||
writeToLogFile("Allocation of size %i failed in function '%s' at %s:%i.\n", size, func, file, line);
|
||||
-#ifndef WIN
|
||||
- writeToLogFile("Memory usage at exit: %u\n", mallinfo().arena);
|
||||
-#elif LINUX
|
||||
+#if defined(__GLIBC__) || defined(ANDROID) || defined(VITA)
|
||||
writeToLogFile("Memory usage at exit: %u\n", mallinfo().arena);
|
||||
writeToLogFile("Memory usage at exit: %u\n", mallinfo2().arena);
|
||||
#endif
|
||||
borExit(2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue