CLOSE READER does not reset reader to []
A Logo programming environment for Microsoft Windows
Brought to you by:
david_costanzo
Running "CLOSE READER" leaves READER in an inconsistent state. It points to a file that is already closed. What's worse, this can cause FMSLogo to internally use a FILE* pointer that has already been closed. I have not seen this crash yet, but I have seen memory corruption around SETWRITE that may be related.
UCBLogo resets READER and WRITER to [] when they are closed. I think this is good, safe behavior that is worth emulating.
How Reproducible:
Every Time:
Steps to Reproduce:
OPENREAD "FMSLOGO.TXT
SETREAD "FMSLOGO.TXT
CLOSE READER
SHOW READER
What Happens:
FMSLOGO.TXT
Expected Result:
[]
Logged In: YES
user_id=109252
Originator: YES
I have checked in a fix for this bug. It will be available in FMSLogo 6.12.0.
I have confirmed that this bug fix also fixed the memory corruption that halted the full test pass.