[X2Go-Commits] [nx-libs] 11/219: Font.c: Avoid duplicate font paths
git-admin at x2go.org
git-admin at x2go.org
Sat Sep 28 12:10:11 CEST 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch 3.6.x
in repository nx-libs.
commit 0086b8c2469fbf19a337f38f5431bd77da045332
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Tue Apr 23 20:08:57 2019 +0200
Font.c: Avoid duplicate font paths
---
nx-X11/programs/Xserver/hw/nxagent/Font.c | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c
index 89128d4c1..11496938c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Font.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c
@@ -1497,12 +1497,36 @@ void nxagentVerifyDefaultFontPath(void)
for (int i = 0; ; i++)
{
- char *dir = nxagentFontDirs[i];
+ int j;
+ const char *dir = nxagentFontDirs[i];
if (dir == NULL)
+ {
break;
+ }
else
- nxagentVerifySingleFontPath(&fontPath, dir);
+ {
+ for (j = 0; j <= i; j++)
+ {
+ //if (strcmp(nxagentFontDirs[j], dir) == 0)
+ if (nxagentFontDirs[j] == dir)
+ {
+ break;
+ }
+ }
+
+ if (j == i)
+ {
+ nxagentVerifySingleFontPath(&fontPath, dir);
+ }
+#ifdef TEST
+ else
+ {
+ fprintf(stderr, "%s: Skipping duplicate font dir [%s].\n", __func__,
+ validateString(dir));
+ }
+#endif
+ }
}
if (*fontPath == '\0')
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list