Skip to content

Commit

Permalink
Merge pull request #20 from jpoirier/develop
Browse files Browse the repository at this point in the history
add the last bits of the hack
  • Loading branch information
jpoirier authored Jan 17, 2018
2 parents 2e35505 + 676addf commit bb3c5ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion expression.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
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.1"
#define PICOC_VERSION "v2.3.2"
#endif

#include "interpreter.h"
Expand Down

0 comments on commit bb3c5ef

Please sign in to comment.