Re: Running safe.e ???
----- 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
|
Not Categorized, Please Help
|
|