summaryrefslogtreecommitdiffstats
path: root/firmware/common
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2017-01-14 00:20:07 -0500
committerMichael Sevakis <jethead71@rockbox.org>2017-01-14 00:20:07 -0500
commit0a5b0dd9081a83a9a8f6abec9bde04a594cc337e (patch)
tree2578c845b60f3b9ac9ff15b176c5de5275e69cad /firmware/common
parentc1b913bb7da17374cec5688c16d2f0e96ae5e662 (diff)
downloadrockbox-0a5b0dd9081a83a9a8f6abec9bde04a594cc337e.tar.gz
rockbox-0a5b0dd9081a83a9a8f6abec9bde04a594cc337e.tar.bz2
rockbox-0a5b0dd9081a83a9a8f6abec9bde04a594cc337e.zip
Dircache: Fix a tiny-block reclaim bug
Logic left over from before switching from NULL-terminated to counted strings would prevent a single-byte tiny free block gap from being properly reclaimed into free string bytes. Due to rarity, not as disasterous to functionality so much as wrong. Change-Id: I68e0875b04bb0ab6cdead0fdf535144b9c1bc13e
Diffstat (limited to 'firmware/common')
-rw-r--r--firmware/common/dircache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c
index 96b06eb547..b93ee73fc6 100644
--- a/firmware/common/dircache.c
+++ b/firmware/common/dircache.c
@@ -849,7 +849,7 @@ static void free_name(int nameidx, size_t size)
while (beg[-1] == 0xfe)
--beg;
- while (end[1] == 0xfe)
+ while (end[0] == 0xfe)
++end;
size = end - beg;