From 2e77a22e2cd26820fc8a83c657dffe672df6d8e0 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 19 Feb 2017 17:20:09 -0800 Subject: 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 --- core/divesite.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core') diff --git a/core/divesite.c b/core/divesite.c index 2d7bdbefe..73c198e99 100644 --- a/core/divesite.c +++ b/core/divesite.c @@ -275,6 +275,9 @@ static void merge_string(char **a, char **b) { char *s1 = *a, *s2 = *b; + if (!s2) + return; + if (same_string(s1, s2)) return; -- cgit v1.2.3-70-g09d2