bug in SOMETHING?!
I have code a bit like this
a=allocate_string("blah")
err=c_func(functionname,{a}) --err<0 on error, 0 on success
free(a)
The code works fine on my Celeron/433 running Windows 98, whatever I do. It
works fine on my Windows 95 486-SX/50 too - unless I bind it with shrouding
enabled. err then shows an error. However, if I then comment out the
free(a) line, err shows success.
Now why should this be? Euphoria seems to be executing the third line
before the second in some circumstances.
So I forced the program to check that functionname had been executed by
checking for the value of err before freeing a:
a=allocate_string("blah")
err=c_func(functionname,{a})
if err then end if --check value of err
free(a)
and everything works fine. But this has taken days to track down.
So is this a bug in
a) my code
b) Euphoria
c) Windows 95
d) the 486 chip
e) something else?
chrissy.
|
Not Categorized, Please Help
|
|