Skip to content

Commit

Permalink
Fixed segv on Raspberry Pi
Browse files Browse the repository at this point in the history
TESS_UNDEF was defined to 2^31-1 when it should have been 2^16-1
on the raspberry pi.  This caused some if statements such as
   if (v->n != TESS_UNDEF)
to not work as expected leading to a segv.
  • Loading branch information
johnkingsley committed Mar 20, 2017
1 parent d2eb2bc commit ff0898e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apothecary/formulas/tess2/tess2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ index c27541e..eafb0aa 100755
// See OpenGL Red Book for description of the winding rules
// http://www.glprogramming.com/red/chapter11.html
enum TessWindingRule
@@ -115,7 +119,11 @@ enum TessElementType
@@ -115,11 +119,15 @@
};

typedef float TESSreal;
Expand All @@ -26,6 +26,11 @@ index c27541e..eafb0aa 100755
typedef struct TESStesselator TESStesselator;
typedef struct TESSalloc TESSalloc;

-#define TESS_UNDEF (~(TESSindex)0)
+#define TESS_UNDEF ((TESSindex)~0)

#define TESS_NOTUSED(v) do { (void)(1 ? (void)0 : ( (void)(v) ) ); } while(0)

diff --git a/Source/tess.c b/Source/tess.c
index 67c038f..93061bb 100755
--- a/Source/tess.c
Expand Down

0 comments on commit ff0898e

Please sign in to comment.