Why is the following code not working:
function test(var* returns);
function main()
{
var return_var = 0;
test(&return_var);
while(return_var == 0) {wait(1);}
error("Test!");
}
function test(var* returns)
{
wait(6);
*returns = 1;
}
If I remove the wait(6); the code is working correctly and error("Test!"); gets executed, but with the wait(6); Lite-C gets stuck in the while loop.
Am I overlooking something??
Are addresses after a wait not valid anymore?
I'm using A7.80 and I'm sure that in older versions this was possible.