summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorpcpa <paulo.cesar.pereira.de.andrade@gmail.com>2012-05-24 15:29:01 -0300
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-05-31 23:00:34 -0700
commit04ca5cd8abfe9851f0987b4739f9795e924024cf (patch)
tree011e877f8f899665a64bb9ef876d7bea2238c5ab /util.c
parent63c70c830c79f0b4cfc0f7393662a9cb1169973e (diff)
Use proper pointer when computing "realpath" of a new file.
In some special conditions it previously could omit a slash, and instead of creating foo/bar/baz would create foo/barbaz. Signed-off-by: pcpa <paulo.cesar.pereira.de.andrade@gmail.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index f65bf4d..2378b40 100644
--- a/util.c
+++ b/util.c
@@ -522,7 +522,7 @@ ResolveName(char *filename)
int length = strlen(result);
XmuSnprintf(result + length, BUFSIZ - length, "%s%s",
- dir[length - 1] == '/' ? "" : "/", file);
+ result[length - 1] == '/' ? "" : "/", file);
}
XtFree(tmp);