From 68da050e348945a11d9354ce0f4cb11aa33bf079 Mon Sep 17 00:00:00 2001
From: obarun <eric@obarun.org>
Date: Wed, 17 Jun 2020 21:24:11 +1100
Subject: [PATCH] close the string framboise

---
 src/lib66/ss_resolve.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib66/ss_resolve.c b/src/lib66/ss_resolve.c
index 4c408896..91e35c90 100644
--- a/src/lib66/ss_resolve.c
+++ b/src/lib66/ss_resolve.c
@@ -1488,6 +1488,7 @@ int ss_resolve_svtree(stralloc *svtree,char const *svname,char const *tree)
 			if (!auto_stra(&tmp,name,SS_SVDIRS)) goto err ;
 			if (ss_resolve_check(tmp.s,svname))
 			{
+				svtree->len = 0 ;
 				if (!tree || (tree && !strcmp(name,tree))){
 					if (!stralloc_copy(svtree,&tmp)) goto err ;
 					copied = 1 ;
@@ -1504,7 +1505,7 @@ int ss_resolve_svtree(stralloc *svtree,char const *svname,char const *tree)
 
 	if (found > 2 && tree) found = 2 ;
 	if (!copied) found = 1 ;
-
+	if (!stralloc_0(svtree)) goto err ;
 	freed:
 	stralloc_free(&satree) ;
 	stralloc_free(&tmp) ;
-- 
GitLab