From 676addf333064a5eee9acdb52dd4b81b0a9e709c Mon Sep 17 00:00:00 2001 From: Joseph Poirier Date: Wed, 17 Jan 2018 00:55:24 -0600 Subject: [PATCH] add the last bits of the hack --- expression.c | 4 +++- picoc.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/expression.c b/expression.c index e463675..6a6c8c0 100644 --- a/expression.c +++ b/expression.c @@ -442,13 +442,15 @@ void ExpressionPushInt(struct ParseState *Parser, { struct Value *ValueLoc = VariableAllocValueFromType(Parser->pc, Parser, &Parser->pc->IntType, false, NULL, false); - // jdp: ugly hack to properly print long values + // jdp: an ugly hack to a) assign the correct value and b) properly print long values ValueLoc->Val->UnsignedLongInteger = (unsigned long)IntValue; ValueLoc->Val->LongInteger = (long)IntValue; ValueLoc->Val->Integer = (int)IntValue; ValueLoc->Val->ShortInteger = (short)IntValue; ValueLoc->Val->UnsignedShortInteger = (unsigned short)IntValue; ValueLoc->Val->UnsignedInteger = (unsigned int)IntValue; + ValueLoc->Val->UnsignedCharacter = (unsigned char)IntValue; + ValueLoc->Val->Character = (char)IntValue; ExpressionStackPushValueNode(Parser, StackTop, ValueLoc); } diff --git a/picoc.h b/picoc.h index 3821e2e..8c188e9 100644 --- a/picoc.h +++ b/picoc.h @@ -9,7 +9,7 @@ /* VER, the git hash number, and TAG are obtained via the Makefile */ #define PICOC_VERSION TAG " r" VER #else -#define PICOC_VERSION "v2.3.1" +#define PICOC_VERSION "v2.3.2" #endif #include "interpreter.h"