From 1510bbd3ad9b1d39ab09e37d507399fb808fc83a Mon Sep 17 00:00:00 2001 From: Chris Young Date: Fri, 9 Jul 2010 19:55:13 +0000 Subject: Check the last character for a path separator, rather than the NULL string termination. svn path=/trunk/netsurf/; revision=10622 --- framebuffer/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'framebuffer') diff --git a/framebuffer/misc.c b/framebuffer/misc.c index 143ea8cf9..6f9f3878d 100644 --- a/framebuffer/misc.c +++ b/framebuffer/misc.c @@ -71,7 +71,7 @@ char *filename_from_path(char *path) bool path_add_part(char *path, int length, char *newpart) { - if(path[strlen(path)] != '/') + if(path[strlen(path) - 1] != '/') strncat(path, "/", length); strncat(path, newpart, length); -- cgit v1.2.3