diff options
Diffstat (limited to 'name-hash.c')
-rw-r--r-- | name-hash.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/name-hash.c b/name-hash.c index 6d9f23e932..139263b5e0 100644 --- a/name-hash.c +++ b/name-hash.c @@ -201,12 +201,12 @@ void adjust_dirname_case(struct index_state *istate, char *name) if (*ptr == '/') { struct dir_entry *dir; - ptr++; - dir = find_dir_entry(istate, name, ptr - name + 1); + dir = find_dir_entry(istate, name, ptr - name); if (dir) { memcpy((void *)startPtr, dir->name + (startPtr - name), ptr - startPtr); - startPtr = ptr; + startPtr = ptr + 1; } + ptr++; } } } |