mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix dive site string merging
If the second dive site doesn't have a particular string, but the first one does, we did the wrong thing and created a result string like (first dive site string) or ((null)) which is not useful. We should just use the first dive site string as-is. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6e40a510c6
commit
2e77a22e2c
1 changed files with 3 additions and 0 deletions
|
@ -275,6 +275,9 @@ static void merge_string(char **a, char **b)
|
||||||
{
|
{
|
||||||
char *s1 = *a, *s2 = *b;
|
char *s1 = *a, *s2 = *b;
|
||||||
|
|
||||||
|
if (!s2)
|
||||||
|
return;
|
||||||
|
|
||||||
if (same_string(s1, s2))
|
if (same_string(s1, s2))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue