zsaleeba / picoc

A very small C interpreter
1.45k stars 183 forks source link

Failed assertion when combining assignment of four or more variables #17

Open cmlsharp opened 9 years ago

cmlsharp commented 9 years ago

The folowing input into interactive mode produces a failed assertion:

starting picoc v2.2
picoc> int a,b,c,d;
picoc> a=b=c=d=0;
picoc: lex.c:574: LexTokenise: Assertion `ReserveSpace >= MemUsed' failed.
[1]    6395 abort (core dumped)  picoc -i

However, doing the same action with two or three variables works fine e.g.

// This works fine
picoc> int a,b,c;
picoc> a=b=c=0;
abhishek-kumar-7391 commented 8 years ago

starting picoc v2.2 beta r picoc> int a,b,c,d; picoc> a=b=c=d=10; picoc>