summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authordholland <dholland>2009-05-23 15:02:42 +0000
committerdholland <dholland>2009-05-23 15:02:42 +0000
commitec75b2d906ff417a55dccc6db7a7ed7ea591c8db (patch)
tree429610c436483592d631a577bfff8a70b3191c8f /games
parent9c47b5ce5adf1d45a6a95d8e49ca81ae8691bebb (diff)
downloadpkgsrc-ec75b2d906ff417a55dccc6db7a7ed7ea591c8db.tar.gz
Commit my crash-fix patches from PR 37267. PKGREVISION++ (to 5)
This also fixes the infamous "Bogus call to CARDS_RenderCard!" bug.
Diffstat (limited to 'games')
-rw-r--r--games/xfrisk/Makefile4
-rw-r--r--games/xfrisk/distinfo5
-rw-r--r--games/xfrisk/patches/patch-ab28
-rw-r--r--games/xfrisk/patches/patch-ac18
-rw-r--r--games/xfrisk/patches/patch-ad32
5 files changed, 84 insertions, 3 deletions
diff --git a/games/xfrisk/Makefile b/games/xfrisk/Makefile
index 690ff1bff7d..0a46c729d4c 100644
--- a/games/xfrisk/Makefile
+++ b/games/xfrisk/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.21 2009/05/19 08:59:16 wiz Exp $
+# $NetBSD: Makefile,v 1.22 2009/05/23 15:02:42 dholland Exp $
#
DISTNAME= xfrisk-1.2
-PKGREVISION= 4
+PKGREVISION= 5
CATEGORIES= games
MASTER_SITES= http://www.tuxick.net/xfrisk/files/
diff --git a/games/xfrisk/distinfo b/games/xfrisk/distinfo
index 2322bc46085..9a03c5c0149 100644
--- a/games/xfrisk/distinfo
+++ b/games/xfrisk/distinfo
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.5 2007/11/20 18:44:14 rillig Exp $
+$NetBSD: distinfo,v 1.6 2009/05/23 15:02:42 dholland Exp $
SHA1 (xfrisk-1.2.tar.gz) = 2a82c4be95e151fd34f816aaa125f3eb237c28be
RMD160 (xfrisk-1.2.tar.gz) = 7e55be2742bf9b2db40cc10156a6ff615bc37e7a
Size (xfrisk-1.2.tar.gz) = 228943 bytes
SHA1 (patch-aa) = 6b8ddeadccf686e4e380ed07f6ad8559e0d6bce7
+SHA1 (patch-ab) = 8c458f0fa7db8e2a032f592b857f4024769cb4f1
+SHA1 (patch-ac) = ed2194b764c3d78eedabceb9136814cffcb8f25f
+SHA1 (patch-ad) = abd57e121edccbf1f3f78d8f124fbc198722dfcd
diff --git a/games/xfrisk/patches/patch-ab b/games/xfrisk/patches/patch-ab
new file mode 100644
index 00000000000..208cdc3642c
--- /dev/null
+++ b/games/xfrisk/patches/patch-ab
@@ -0,0 +1,28 @@
+$NetBSD: patch-ab,v 1.1 2009/05/23 15:02:42 dholland Exp $
+
+This patch fixes some stuff that breaks if you compile with assertions
+and debugging on.
+
+upstream: AFAIK upstream is currently comatose/dead
+
+--- findtypes.c~ 1999-11-13 16:58:31.000000000 -0500
++++ findtypes.c 2007-11-02 14:49:44.000000000 -0400
+@@ -77,12 +77,12 @@
+ fprintf(file, "/* Pointer type */\n");
+
+ /* Find the types */
+- if (sizeof(void *) == sizeof (int))
+- pointerType = "int";
+- else if (sizeof(void *) == sizeof(long int))
+- pointerType = "long int";
+- else if (sizeof(void *) == sizeof(short int))
+- pointerType = "short int";
++ if (sizeof(void *) == sizeof (unsigned))
++ pointerType = "unsigned";
++ else if (sizeof(void *) == sizeof(long unsigned))
++ pointerType = "long unsigned";
++ else if (sizeof(void *) == sizeof(short unsigned))
++ pointerType = "short unsigned";
+ else
+ {
+ printf("Cannot find integer the size of a pointer on this machine.\n");
diff --git a/games/xfrisk/patches/patch-ac b/games/xfrisk/patches/patch-ac
new file mode 100644
index 00000000000..c3f54e4a19b
--- /dev/null
+++ b/games/xfrisk/patches/patch-ac
@@ -0,0 +1,18 @@
+$NetBSD: patch-ac,v 1.1 2009/05/23 15:02:42 dholland Exp $
+
+This patch fixes some stuff that breaks if you compile with assertions
+and debugging on.
+
+upstream: AFAIK upstream is currently comatose/dead
+
+--- viewStats.c~ 2000-01-16 13:47:02.000000000 -0500
++++ viewStats.c 2007-11-02 14:58:28.000000000 -0400
+@@ -632,7 +632,7 @@
+ break;
+
+ /* There MUST be a slot */
+- D_Assert(iSlot >= MAX_PLAYERS, "Whoa, dude! Bogus player somewhere?!");
++ D_Assert(iSlot < MAX_PLAYERS, "Whoa, dude! Bogus player somewhere?!");
+
+ /* Actually dump the data to the slot */
+ STAT_RenderSlot(iSlot, iPlayer);
diff --git a/games/xfrisk/patches/patch-ad b/games/xfrisk/patches/patch-ad
new file mode 100644
index 00000000000..b983b465fe8
--- /dev/null
+++ b/games/xfrisk/patches/patch-ad
@@ -0,0 +1,32 @@
+$NetBSD: patch-ad,v 1.1 2009/05/23 15:02:42 dholland Exp $
+
+This patch fixes at least one set of "Bogus call to CARDS_RenderCard"
+problems - the problem being that if the card deck ran out, the server
+would start handing out card -1.
+
+I don't know if this is the same problem we used to see back in the
+day or a different one.
+
+upstream: AFAIK upstream is currently comatose/dead
+
+--- server.c~ 2000-01-02 17:52:17.000000000 -0500
++++ server.c 2007-11-02 15:33:03.000000000 -0400
+@@ -427,11 +427,17 @@
+
+ case MSG_REQUESTCARD: {
+ MsgRequestCard *pMess = (MsgRequestCard *)pvMessage;
++ Int32 iCard;
++
++ iCard = DECK_GetCard(pCardDeck);
++ if (iCard < 0) {
++ break;
++ }
+
+ RISK_SetCardOfPlayer(pMess->iPlayer,
+ RISK_GetNumCardsOfPlayer
+ (pMess->iPlayer),
+- DECK_GetCard(pCardDeck));
++ iCard);
+ RISK_SetNumCardsOfPlayer(pMess->iPlayer,
+ RISK_GetNumCardsOfPlayer
+ (pMess->iPlayer)+1);