diff options
author | junovitch <junovitch@FreeBSD.org> | 2016-04-10 09:21:51 +0800 |
---|---|---|
committer | junovitch <junovitch@FreeBSD.org> | 2016-04-10 09:21:51 +0800 |
commit | 7ed25f626c52f9d8c93802d44818e406686539c9 (patch) | |
tree | c42a40b09e1af7c85887192d5bbe82dff84abf11 /games | |
parent | 4e7dc92c09a70326a9aba69b2d79d8e6d0f3d88f (diff) | |
download | freebsd-ports-gnome-7ed25f626c52f9d8c93802d44818e406686539c9.tar.gz freebsd-ports-gnome-7ed25f626c52f9d8c93802d44818e406686539c9.tar.zst freebsd-ports-gnome-7ed25f626c52f9d8c93802d44818e406686539c9.zip |
games/taipan: fix out of bounds array subscript
taipan.c:2709:7: warning: array index 4 is past the end of the array (which contains 4 elements) [-Warray-bounds]
PR: 206771
Submitted by: Dave Walton <dw-fbsd@digger.net>
Submitted by: c.brinkhaus@t-online.de
Diffstat (limited to 'games')
-rw-r--r-- | games/taipan/Makefile | 2 | ||||
-rw-r--r-- | games/taipan/files/patch-taipan.c | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/games/taipan/Makefile b/games/taipan/Makefile index 9aabc8dd0155..6742eacd75ab 100644 --- a/games/taipan/Makefile +++ b/games/taipan/Makefile @@ -3,7 +3,7 @@ PORTNAME= taipan PORTVERSION= 0.9 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= games MASTER_SITES= SUNSITE/games/textrpg diff --git a/games/taipan/files/patch-taipan.c b/games/taipan/files/patch-taipan.c index 35a18b4187ed..0518f2d70c6e 100644 --- a/games/taipan/files/patch-taipan.c +++ b/games/taipan/files/patch-taipan.c @@ -1,6 +1,6 @@ ---- taipan.c.orig Fri Mar 15 15:05:41 2002 -+++ taipan.c Fri Mar 15 15:08:30 2002 -@@ -2572,7 +2572,7 @@ +--- taipan.c.orig 2001-12-31 16:09:20 UTC ++++ taipan.c +@@ -2572,7 +2572,7 @@ void mchenry(void) amount = get_num(9); if (amount == -1) { @@ -9,3 +9,13 @@ } if (amount <= cash) { +@@ -2705,8 +2705,8 @@ void final_stats(void) + bank = 0; + hkw_[0] = 0; + hkw_[1] = 0; ++ hkw_[2] = 0; + hkw_[3] = 0; +- hkw_[4] = 0; + hold_[0] = 0; + hold_[1] = 0; + hold_[2] = 0; |