Commit 9a6b90c3 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Font.c: make nxagentGetFontServerPath more readable

parent 677da7fd
......@@ -1411,11 +1411,12 @@ static Bool nxagentGetFontServerPath(char * fontServerPath)
if (NXGetFontParameters(nxagentDisplay, sizeof(path), path) == True)
{
if (*path != '\0')
{
strncpy(fontServerPath, path + 1, *path);
unsigned int len = *path;
fontServerPath[*path] = '\0';
if (len)
{
strncpy(fontServerPath, path + 1, len);
fontServerPath[len] = '\0';
#ifdef TEST
fprintf(stderr, "nxagentGetFontServerPath: Got path [%s].\n",
......
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