Commit 0086b8c2 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Font.c: Avoid duplicate font paths

parent 78a16245
......@@ -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')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment