Open-Turing-Project / OpenTuring

An open source version of the Windows Turing interpreter. Features speed improvements and new features.
http://tristan.hume.ca/openturing
Other
73 stars 41 forks source link

The Time.Date Function Causes a Crash. #28

Closed trishume closed 12 years ago

trishume commented 12 years ago

When called, the Time.Date function crashes the editor. It is possible that other time functions crash the editor as well.

This is untested. Submitted by Raknarg.

This is important. Crashing is bad.

ghost commented 12 years ago

Yup. He's right.

ghost commented 12 years ago

Also I forgot to save my project before testing this bug so I lost a bunch of code.

trishume commented 12 years ago

Ctrl+S after every line. But otherwise do other Time.X functions work? Time.Elapsed, Time.Sec, etc...

ghost commented 12 years ago

Seems Time functions that deal with converting Seconds-since-Unix-Epoch to and from other formats are broken. Time.SecDate causes an error, Time.SecParts causes the program to hang, and Time.SecStr causes an error as well.

ghost commented 12 years ago

Also the "time" function causes a crash as well.

trishume commented 12 years ago

Fixed in dev branch. At some point time_t became 64 bit and not 32 bit. This caused int pointers to be cast to long pointers causing an extra byte to be read after the int.