1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00
freebsd-ports/games/0verkill/files/patch-data.c
Michael Landin 2dac7afb6a 1. Merge fixes for long known bugs from hackndev[1] version
3507529 64bit fix ... now works on amd64 as well ;-)
95d2af2 Replaced all those insecure sprintf's with snprintf's (partial)
33a1a8d Fix sigsegv on hero reaching topmost or leftmost border of the game area
436bbfc Push back network stack underflow bugfix
160e4d6 Prevent buffer overflow
ee911ba make the server invulnerable to long names
2. Add patch from gentoo linux[2] to use unmodified game data.
3. Support staging
4. Use options framework

[1] https://github.com/hackndev/0verkill
[2] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/games-action/0verkill/files/0verkill-0.16-gentoo-paths.patch?revision=1.1&view=markup

PR:		ports/184252
Submitted by:	Vladimir Kondratiev <wulf@cicgroup.ru>
2013-12-23 16:32:05 +00:00

21 lines
548 B
C

--- data.c.orig 2013-11-17 11:25:40.820307151 +0400
+++ data.c 2013-11-17 11:27:32.743383408 +0400
@@ -460,7 +460,7 @@
my_double can_go_x(my_double old_x,my_double new_x,int yh, int yl,unsigned char *flag)
{
int x,y;
-
+ if (yh<0) yh=0;
if (old_x==new_x+.5)
{
if(flag)*flag=0;
@@ -494,7 +494,7 @@
my_double can_go_y(my_double old_y, my_double new_y,int xl, int xr,unsigned char *flag,unsigned char down_ladder)
{
int x,y;
-
+ if (xl<0) xl=0;
if (old_y==new_y){if(flag)*flag=0;return new_y;}
if(flag)*flag=1;
if (old_y<new_y)