pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/xfrisk Commit my crash-fix patches from PR 37267...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/36497b3a99fe
branches:  trunk
changeset: 393680:36497b3a99fe
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sat May 23 15:02:42 2009 +0000

description:
Commit my crash-fix patches from PR 37267. PKGREVISION++ (to 5)

This also fixes the infamous "Bogus call to CARDS_RenderCard!" bug.

diffstat:

 games/xfrisk/Makefile         |   4 ++--
 games/xfrisk/distinfo         |   5 ++++-
 games/xfrisk/patches/patch-ab |  28 ++++++++++++++++++++++++++++
 games/xfrisk/patches/patch-ac |  18 ++++++++++++++++++
 games/xfrisk/patches/patch-ad |  32 ++++++++++++++++++++++++++++++++
 5 files changed, 84 insertions(+), 3 deletions(-)

diffs (118 lines):

diff -r 83d4218997bd -r 36497b3a99fe games/xfrisk/Makefile
--- a/games/xfrisk/Makefile     Sat May 23 12:58:34 2009 +0000
+++ b/games/xfrisk/Makefile     Sat May 23 15:02:42 2009 +0000
@@ -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 -r 83d4218997bd -r 36497b3a99fe games/xfrisk/distinfo
--- a/games/xfrisk/distinfo     Sat May 23 12:58:34 2009 +0000
+++ b/games/xfrisk/distinfo     Sat May 23 15:02:42 2009 +0000
@@ -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 -r 83d4218997bd -r 36497b3a99fe games/xfrisk/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xfrisk/patches/patch-ab     Sat May 23 15:02:42 2009 +0000
@@ -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 -r 83d4218997bd -r 36497b3a99fe games/xfrisk/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xfrisk/patches/patch-ac     Sat May 23 15:02:42 2009 +0000
@@ -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 -r 83d4218997bd -r 36497b3a99fe games/xfrisk/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/xfrisk/patches/patch-ad     Sat May 23 15:02:42 2009 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index