From 969878fc6fed5e43b4f7e2e3ee46835d93d30dfd Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Tue, 25 Nov 2003 19:28:09 +0000 Subject: XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks --- src/library.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/library.c b/src/library.c index 3512649..b359c45 100644 --- a/src/library.c +++ b/src/library.c @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/Xcursor/library.c,v 1.2 2003/01/26 03:22:42 eich Exp $ + * $XFree86: xc/lib/Xcursor/library.c,v 1.4 2003/11/11 01:17:54 dawes Exp $ * * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * @@ -101,12 +101,19 @@ _XcursorBuildThemeDir (const char *dir, const char *theme) if (!home) return 0; homelen = strlen (home); + /* A '/' gets prepended if $HOME doesn't start with one. */ + if (home[0] != '/') + homelen++; dir++; dirlen--; } len = homelen + dirlen + 1 + themelen + 1; + /* A '/' gets inserted if dir doesn't start with one. */ + if (dir[0] != '/') + len++; + full = malloc (len); if (!full) return 0; -- cgit v1.2.3