aboutsummaryrefslogtreecommitdiff
path: root/jim-file.c
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-07-12 20:14:01 +1000
committerSteve Bennett <steveb@workware.net.au>2011-07-12 20:26:47 +1000
commit4f9f399b9a5be5b13324a7cc08d51457b9244796 (patch)
treeb688cb1a4737f1380c44463fd9b24d16cf0b3c54 /jim-file.c
parent652539291e7ff617a9c5480a3445b1afacf6fa8f (diff)
downloadjimtcl-4f9f399b9a5be5b13324a7cc08d51457b9244796.zip
jimtcl-4f9f399b9a5be5b13324a7cc08d51457b9244796.tar.gz
jimtcl-4f9f399b9a5be5b13324a7cc08d51457b9244796.tar.bz2
Fix a string length error in [file join] from 3b317b1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-file.c')
-rw-r--r--jim-file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/jim-file.c b/jim-file.c
index 8e3d9d6..5c962ac 100644
--- a/jim-file.c
+++ b/jim-file.c
@@ -288,6 +288,7 @@ static int file_cmd_join(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
else if (part[0] == '.') {
if (part[1] == '/') {
part += 2;
+ len -= 2;
}
else if (part[1] == 0 && last != newname) {
/* Adding '.' to an existing path does nothing */