diff options
Diffstat (limited to 'lib/sqfs/dir_reader.c')
-rw-r--r-- | lib/sqfs/dir_reader.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/sqfs/dir_reader.c b/lib/sqfs/dir_reader.c index e1ff9bc..bae24d5 100644 --- a/lib/sqfs/dir_reader.c +++ b/lib/sqfs/dir_reader.c @@ -235,8 +235,14 @@ int sqfs_dir_reader_find_by_path(sqfs_dir_reader_t *rd, const char *path, return ret; ptr = strchr(path, '/'); - if (ptr == NULL) - ptr = strchrnul(path, '\\'); + if (ptr == NULL) { + ptr = strchr(path, '\\'); + + if (ptr == NULL) { + for (ptr = path; *ptr != '\0'; ++ptr) + ; + } + } do { ret = sqfs_dir_reader_read(rd, &ent); |