Re: WEE error

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu