aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-12-17 15:55:47 -0800
committerThomas White <taw@physics.org>2012-02-22 15:27:10 +0100
commit4dccca06469f97b7b13abab8bc9cd1dac71a04c1 (patch)
tree03c739051ef12b07d6726c66449cf0e78bea45d5 /src/utils.c
parent4ca2f404b0bf103ea0ef2103a1610085a9812419 (diff)
Fix safe_basename()
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c2
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;