Closed michaelpradel closed 10 years ago
Hi, I'm looking at this, but I don't seem to be able to enter the two examples you give - they both seem to result in 'Malformed expression'. Can you explain what I am missing? Thanks!
Interesting. I was working with an older version of the app and it seems the problem is fixed in the current version.
Thanks, Michael
Yes, interesting...I'm not aware of any changes that would fix the infinite loop. Might it be due to a newer version of peg?
It'd be nice to know what the cause was, and the fix; but otherwise I suppose we could just close this. since.
no response, so closing.
Entering an invalid formula and pressing the "=" button can lead to an infinite loop that makes the app unresponsive. For example, enter 1+cos-15 or 1*cos-15. The problem is is in peg-code.txt, which fails to check whether the right-hand side of an additive or multiplicative is NaN. To fix the problem, you can insert the following check at lines 21 and 59 of peg-code.txt:
Thanks, Michael