[PATCH] dive.c:merge_text(): Slighly better string merge logic

Lubomir I. Ivanov neolit123 at gmail.com
Fri Mar 8 09:04:46 PST 2013


On 8 March 2013 18:55, Dirk Hohndel <dirk at hohndel.org> wrote:
> I don't agree with this patch.
>
> Imagine that a="" and b="Great dive location"
> The existing code returns a copy of "Great dive location" while your
> code returns "() or (Great dive locations)".
> That is not an improvement.
>

yeah, it has to be improved further.

> Can you explain in more detail what you are trying to fix?
>

the backtrace of #90, showed:
(a=0x348d770 "", b=0x0) at dive.c:911

where 'a' is "", but 'b' is NULL, so it passes NULL to strdup().

lubomir
--


More information about the subsurface mailing list