mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
Fix allocate_filenum last dir/file checks
* dwarf2dbg.c (allocate_filenum) Correct use of last_used_dir_len.
This commit is contained in:
parent
5b4846283c
commit
d467335403
@ -730,9 +730,9 @@ allocate_filenum (const char * pathname)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (filename_ncmp (pathname, dirname, last_used_dir_len) == 0
|
||||
&& IS_DIR_SEPARATOR (pathname [last_used_dir_len])
|
||||
&& filename_cmp (pathname + last_used_dir_len + 1,
|
||||
if (filename_ncmp (pathname, dirname, last_used_dir_len - 1) == 0
|
||||
&& IS_DIR_SEPARATOR (pathname [last_used_dir_len - 1])
|
||||
&& filename_cmp (pathname + last_used_dir_len,
|
||||
files[last_used].filename) == 0)
|
||||
return last_used;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user