summaryrefslogtreecommitdiff
path: root/sci-mathematics/gfan/files/gfan-0.6.2-fix-0602ResultantFanProjection.patch
blob: 99fe8167398ebfd625ec9621cf6b92548e2bc52f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Description: Use int64_t instead of signed long int for 64-bit integer typedef
 On 32-bit architectures, longs are only 32 bits.  The resulting overflow
 was causing an infinite loop in the 0602ResultantFanProjection test.
Bug-Debian: https://bugs.debian.org/905300
Bug-Debian: https://bugs.debian.org/974558
Author: Doug Torrance <dtorrance@piedmont.edu>
Last-Update: 2020-11-12

(mjo: added missing include)

--- a/src/vektor.h
+++ b/src/vektor.h
@@ -6,11 +6,12 @@
 #include <assert.h>
 #include <algorithm>
 #include <complex>
+#include <cstdint>
 #include <stdio.h>
 
 using namespace std;
 
-typedef signed long int int64;
+typedef int64_t int64;
 
 void outOfRange(int i, int n);