Page 3 of 3

Re: Records saving

Posted: 02 Mar 2012, 08:43
by Chris
werdanith wrote:That's why I said I don't know what to do about it. This requires either the ESM_Context struct to be rewritten or a function that converts floats that pretend to be ints into real floats.
Perhaps just treat the version like a 4-byte enum with specific recognized values. No floats. Floating-point equality is a really tricky thing anyway when dealing with numbers that aren't exactly representable. Some compilers even throw warnings about using ==, <=, >= or != with floats.

Re: Records saving

Posted: 02 Mar 2012, 08:49
by werdanith
Chris wrote:Perhaps just treat the version like a 4-byte enum with specific recognized values. No floats. Floating-point equality is a really tricky thing anyway when dealing with numbers that aren't exactly representable. Some compilers even throw warnings about using ==, <=, >= or != with floats.
Essentially that's how the esm_reader and my conditional treat it.