From 1ad96e2c47362581bd9a5bf2bb19ff6ce6f8c29a Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Wed, 14 Jun 2017 13:54:52 +0200 Subject: [PATCH] - 64bit bugfix --- binprot.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/binprot.c b/binprot.c index e07992e6..9313230d 100644 --- a/binprot.c +++ b/binprot.c @@ -1,5 +1,6 @@ #include #include +#include #include "ascon.h" #include "ascon.i" #include "dynstring.h" @@ -398,7 +399,7 @@ int BinHandler(Ascon *a) { int valen; BinDataType type; long iValue; - unsigned long uValue; + uint32_t uValue; double fValue; BinPrivate *p = a->private; @@ -664,7 +665,7 @@ int BinHandler(Ascon *a) { p->expectedChars--; p->iValue = p->iValue * 256 + (a->lastChar & 255); if (p->expectedChars <= 0) { - snprintf(item, sizeof item, "%ld ", p->iValue); + snprintf(item, sizeof item, "%d ", (int32_t)p->iValue); DynStringConcat(p->result, item); } break;