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;