From eaff7f8746118faf989173674b4ca2414a1213ee Mon Sep 17 00:00:00 2001
From: Brad Barber <bradb@shore.net>
Date: Sat, 9 Jan 2010 18:07:16 -0500
Subject: [PATCH] qhull 2009.1.1 2010/01/09 Apply patch
 project/patch/qhull-2003.1/poly.c-gh_gethash.patch

---
 src/poly.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/poly.c b/src/poly.c
index 3bacbf8..bd21394 100644
--- a/src/poly.c
+++ b/src/poly.c
@@ -403,6 +403,7 @@ unsigned qh_gethash (int hashsize, setT *set, int size, int firstindex, void *sk
   void **elemp= SETelemaddr_(set, firstindex, void);
   ptr_intT hash = 0, elem;
   int i;
+  unsigned result;
 
   switch (size-firstindex) {
   case 1:
@@ -441,9 +442,10 @@ unsigned qh_gethash (int hashsize, setT *set, int size, int firstindex, void *sk
     }while(*elemp);
     break;
   }
-  hash %= (ptr_intT) hashsize;
-  /* hash= 0; for debugging purposes */
-  return hash;
+  result= (unsigned)hash;
+  result %= (unsigned)hashsize;
+  /* result= 0; for debugging purposes */
+  return result;
 } /* gethash */
 
 /*-<a                             href="qh-poly.htm#TOC"
-- 
GitLab