From 04ca5cd8abfe9851f0987b4739f9795e924024cf Mon Sep 17 00:00:00 2001 From: pcpa Date: Thu, 24 May 2012 15:29:01 -0300 Subject: 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 Signed-off-by: Alan Coopersmith --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3