summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorMiika Pekkarinen <miipekk@ihme.org>2011-07-04 17:13:48 +0000
committerMiika Pekkarinen <miipekk@ihme.org>2011-07-04 17:13:48 +0000
commite06bb54d1210c73e894ae7f1213f9032d22ac2b0 (patch)
treedbe2aa48f5a112deced853824352aef8078a8855 /firmware
parent86c64d41517c6a62acab553e35b8c9fe1575b405 (diff)
downloadrockbox-e06bb54d1210c73e894ae7f1213f9032d22ac2b0.tar.gz
rockbox-e06bb54d1210c73e894ae7f1213f9032d22ac2b0.zip
Initialize the d_names_start pointer correctly in dircache. This should
prevent d_names data from being overwritten (likely causing garbage in file browser and other strange symptoms). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30122 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/common/dircache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c
index 2ce178c7b9..d5b9af6c07 100644
--- a/firmware/common/dircache.c
+++ b/firmware/common/dircache.c
@@ -885,7 +885,9 @@ int dircache_build(int last_size)
for(unsigned i = 0; i < entry_count; i++)
dircache_root[i].d_name -= offset;
+ d_names_start -= offset;
d_names_end -= offset;
+
/* equivalent to dircache_size + DIRCACHE_RESERVE */
allocated_size = (d_names_end - (char*)dircache_root);
reserve_used = 0;