Re: Bug in Safe.e discovered today
- Posted by Al Getz <Xaxo at aol.com> Dec 29, 2005
- 593 views
Robert Craig wrote: > > Al Getz wrote: > > I checked all my 2.5 files and couldnt find any change. > > The files were all from around the end of 2004. > > > > What was the 'official' change that fixed this? > > If you do a fc on safe.e between 2.4 and 2.5 > you'll see that several lines have changed. > > I think the relevant change was to add an > if-statement to test if len is 0 > at the start of safe_address() > I'm not sure if that was the only relevant change. > > }}} <eucode> > function safe_address(atom start, integer len) > -- is it ok to read/write all addresses from start to start+len-1? > atom block_start, block_upper, upper > sequence block > > if len = 0 then > return OK > end if > > ... > </eucode> {{{ > > Regards, > Rob Craig > Rapid Deployment Software > <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a> Hi again Rob, Oh ok that's great...thanks. I could probably use the file then with 2.4 or make the changes in 2.4's file too then. BTW the -safe- level wrapping for 'c_func' was a very good idea... that caught the error right away. I didnt have to wait for the program to try to peek or poke anything. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"