Skip to content

Commit

Permalink
make the ugly hack uglier
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoirier committed Jan 17, 2018
1 parent b8b4c48 commit aad3648
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions expression.c
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,13 @@ 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
ValueLoc->Val->UnsignedLongInteger = IntValue;
ValueLoc->Val->LongInteger = IntValue;
ValueLoc->Val->Integer = IntValue;
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;

ExpressionStackPushValueNode(Parser, StackTop, ValueLoc);
}

Expand Down
2 changes: 1 addition & 1 deletion picoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
#define PICOC_VERSION "v2.3.1"
#endif

#include "interpreter.h"
Expand Down

0 comments on commit aad3648

Please sign in to comment.