NIckname bug (was Re: [PATCH] Allow overlapping (and disjoint) dive trips)

Linus Torvalds torvalds at linux-foundation.org
Sun Dec 30 12:01:27 PST 2012


On Sun, Dec 30, 2012 at 11:38 AM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
>
> It's not heavily tested, but the testing I did was pretty relevant. Take
> my and Dirk's dives (which, as dive buddies, have a lot of overlapping
> dive trips), look at it, and save the end result (and re-load it).

Btw, testing this did show a bug in nickname handling.

The combined dive data had two different Uemis Zurich dive computers,
so subsurface nicely asked for a nickname of the second one. The
logical nickname was "Dirk's Uemis".

But the nickname saving doesn't do the proper quoting of this, so the
end result is not valid XML, so when you save the thing (as
"combined.xml") to verify that everything looks good, re-loading the
result doesn't work.

Dirk, please just print the dive computer list directly in save-xml,
and use the show_utf8() function, instead of doing the "generate one
long string" thing.  Add a flag to the nickname entry of whether it
has been saved or not, and get rid of the strstr(), or something.

                 Linus


More information about the subsurface mailing list