diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-12-17 15:55:47 -0800 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:10 +0100 |
commit | 4dccca06469f97b7b13abab8bc9cd1dac71a04c1 (patch) | |
tree | 03c739051ef12b07d6726c66449cf0e78bea45d5 | |
parent | 4ca2f404b0bf103ea0ef2103a1610085a9812419 (diff) |
Fix safe_basename()
-rw-r--r-- | src/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c index e8239994..5efbdece 100644 --- a/src/utils.c +++ b/src/utils.c @@ -506,7 +506,7 @@ char *safe_basename(const char *in) } /* Find the base name */ - for ( i=strlen(cpy)-1; i>=0; i-- ) { + for ( i=strlen(cpy)-1; i>0; i-- ) { if ( cpy[i] == '/' ) { i++; break; |