summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--firmware/common/dircache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c
index 0cdaf1bd4a..589986911c 100644
--- a/firmware/common/dircache.c
+++ b/firmware/common/dircache.c
@@ -2612,7 +2612,8 @@ static dc_serial_t get_file_serialhash(const struct dircache_file *dcfilep)
idx = ce->up;
}
- h = dc_hash_serialnum(get_idx_dcvolp(idx)->serialnum, h);
+ if (idx < 0)
+ h = dc_hash_serialnum(get_idx_dcvolp(idx)->serialnum, h);
return h;
}