Numbered Steps to Reproduce Problem:
Code Snippet (if applicable) to Reproduce Problem:
/datum/StreamReader
var
SeekPosition = 1
TextFile
New(var/File)
if (FALSE) // Set to TRUE to break BYOND
// If is (Filename or File data as text)
if (istext(File))
if(fexists(File)) // Is it a filename?
TextFile = file2text(file(File)) // Then load it
else
TextFile = File // Nope, just the file text. Use as-is
else // Is file object
TextFile = file2text(File)
else
TextFile = File // assume file text (INCORRECT BEHAVIOUR, BUT DOESN'T CRASH SLEEP() PROCS)
Expected Results:
When if (TRUE), loads file and continues with no side-effects
Actual Results:
when if (TRUE), loads file but causes every current and future call to sleep() to hang indefinitely.
Does the problem occur:
Every time? Or how often? Every time
In other games? not tested
In other user accounts? not tested
On other computers? no testable
When does the problem NOT occur? when leaving it as if(FALSE)
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? Not testable, uses v500 features in project
Workarounds: None, really. if(FALSE) breaks so much other functionality in this project.
Like, a full demo maybe?