Re: Running safe.e ???

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

----- Original Message ----- 
From: <1evan at sbcglobal.net>
To: "EUforum" <EUforum at topica.com>
Subject: Re: Running safe.e ???


> 
> 
> Shouldn't it be:
>  ? peek4u(a)
> 

No! That will fail. 

Because allocate_string pokes BYTES it only allocates enough RAM for each byte
in the string plus an extra one for the trailing zero.

Given that allocate_string("") only reserves a single RAM byte, peek4u(a) will
attempt to fetch 4 bytes from the address but only one has been allocated, thus
it will try to access RAM that it doesn't own.

-- 
Derek

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

Search



Quick Links

User menu

Not signed in.

Misc Menu