void-packages/srcpkgs/libowfat/patches/fix-scan_longlong.patch

22 lines
626 B
Diff

diff --git a/scan/scan_longlong.c b/scan/scan_longlong.c
index 3d0934c..1d99192 100644
--- a/scan/scan_longlong.c
+++ b/scan/scan_longlong.c
@@ -1,6 +1,6 @@
#include "scan.h"
-static const unsigned long maxlong = ((unsigned long)-1)>>1;
+static const unsigned long long maxlonglong = ((unsigned long long)-1)>>1;
#ifdef UNITTEST
#undef UNITTEST
@@ -15,7 +15,7 @@ size_t scan_longlong(const char* src,signed long long* dest) {
unsigned int neg=c=='-';
o=c=='-' || c=='+';
if ((i=scan_ulonglong(src+o,&l))) {
- if (i>0 && l>maxlong+neg) {
+ if (i>0 && l>maxlonglong+neg) {
l/=10;
--i;
}