summaryrefslogtreecommitdiffstats
path: root/programs/lz4cli.c
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2016-12-08 01:47:42 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2016-12-08 01:47:42 (GMT)
commit0280cf40dd01caa784d291480aaead9987ae9f9a (patch)
treea8225ae60d99207e5a12bb237ce5c50fd5e093ad /programs/lz4cli.c
parent7e2d4c4c08934a1fa85fa8324c3e134ce69c6648 (diff)
downloadlz4-0280cf40dd01caa784d291480aaead9987ae9f9a.zip
lz4-0280cf40dd01caa784d291480aaead9987ae9f9a.tar.gz
lz4-0280cf40dd01caa784d291480aaead9987ae9f9a.tar.bz2
fixed path-1, as suggested by @t-mat
Diffstat (limited to 'programs/lz4cli.c')
-rw-r--r--programs/lz4cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/programs/lz4cli.c b/programs/lz4cli.c
index 76e7e14..b63d69d 100644
--- a/programs/lz4cli.c
+++ b/programs/lz4cli.c
@@ -264,7 +264,7 @@ static const char* lastNameFromPath(const char* path)
{
const char* name = strrchr(path, '/');
if (name==NULL) name = strrchr(path, '\\'); /* windows */
- if (name==NULL) name = path-1;
+ if (name==NULL) return path;
return name+1;
}