widl: Strip last separator in append_namespaces if suffix is NULL.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-02-26 09:43:05 +01:00 committed by Alexandre Julliard
parent 31cbca5f07
commit 5f6fdb1838
1 changed files with 6 additions and 1 deletions

View File

@ -124,7 +124,12 @@ static size_t append_namespaces(char **buf, size_t *len, size_t pos, struct name
size_t n = 0;
n += strappend(buf, len, pos + n, "%s", prefix);
if (nested) n += append_namespace(buf, len, pos + n, namespace, separator, abi_prefix);
n += strappend(buf, len, pos + n, "%s", suffix);
if (suffix) n += strappend(buf, len, pos + n, "%s", suffix);
else if (nested)
{
n -= strlen(separator);
(*buf)[n] = 0;
}
return n;
}