summaryrefslogtreecommitdiff
path: root/framebuffer/misc.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2010-07-09 19:55:13 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2010-07-09 19:55:13 +0000
commit1510bbd3ad9b1d39ab09e37d507399fb808fc83a (patch)
tree9d3b0b60922cd71e0de6cca7cb312e3a7604deee /framebuffer/misc.c
parentd6eb28d5deef18c9b3fdb953553705b182ea8403 (diff)
downloadnetsurf-1510bbd3ad9b1d39ab09e37d507399fb808fc83a.tar.gz
netsurf-1510bbd3ad9b1d39ab09e37d507399fb808fc83a.tar.bz2
Check the last character for a path separator, rather than the NULL string termination.
svn path=/trunk/netsurf/; revision=10622
Diffstat (limited to 'framebuffer/misc.c')
-rw-r--r--framebuffer/misc.c2
1 files changed, 1 insertions, 1 deletions
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);