Decimal values rounded on save

Linus Torvalds torvalds at linux-foundation.org
Mon Sep 3 10:46:49 PDT 2012


On Mon, Sep 3, 2012 at 10:38 AM, Ivan Habunek <ivan.habunek at gmail.com> wrote:
> On 3 September 2012 19:00, Linus Torvalds <torvalds at linux-foundation.org> wrote:
>> When you load the original file under Windows, does the depth plot
>> look "jagged" (ie does it look like the depth is already rounded to
>> meters at that point?). Or do you see a nice plot with (for example)
>> the shallow point at 45 minutes into the dive being shown as "5.2 m"
>> deep?
>
> It looks jagged and rounded on load. Just like in Lubomir's screenshot
> (left one).

Ok, I missed Ivan's email. But yes, that confirms that it's a
load-time XML parsing problem.

I suspect the patch I just sent out should fix it. I bet that the
windows 'strtol()' function is broken (probably not the *native* one,
but some MinGW library thing).

It's possible, for example, that somebody incorrectly though that
"strtol() is the same as strtod() with a cast to integer at the end".
Or didn't really think that was true, but couldn't be bothered to
implement strtol() correctly, and didn't think anybody would care.

Thanks,

                 Linus


More information about the subsurface mailing list