Re: WEE error
- Posted by petelomax Dec 03, 2017
- 1154 views
I reproduced this on (/modified) an old copy of wee 0.36, so the root cause (if not the error message) has been around quite a while, at least 12 versions.
sizeof() said...
elsif x = '$' then size = align(size, max_align) exit else
pack() said...
elsif x = '$' then else
So pack isn't adding anything at all for the $, not quite sure what the best fix for that would be, perhaps copy max_align from sizeof() into pack() and poke some zeroes.
It is also an underflow rather than an overflow, less critical, poking less bytes than allocated, so maybe just change
if tmp - ptr != size then
to
if tmp - ptr > size then
Pete