- 64bit bugfix

This commit is contained in:
2017-06-14 13:54:52 +02:00
parent 10cb44df85
commit 1ad96e2c47

View File

@ -1,5 +1,6 @@
#include <ctype.h>
#include <math.h>
#include <stdint.h>
#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;