diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2017-01-14 00:20:07 -0500 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2017-01-14 00:20:07 -0500 |
commit | 0a5b0dd9081a83a9a8f6abec9bde04a594cc337e (patch) | |
tree | 2578c845b60f3b9ac9ff15b176c5de5275e69cad /firmware/common/dircache.c | |
parent | c1b913bb7da17374cec5688c16d2f0e96ae5e662 (diff) |
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/dircache.c')
-rw-r--r-- | firmware/common/dircache.c | 2 |
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; |