summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-03-13 00:04:58 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-03-13 00:04:58 +0000
commite8db003465b28f1ff344edaac90c19d6586b937d (patch)
tree7aaf31dab78460f1ea92ac89155a55a650f101c2
parent16d4d6b49e3f50180b623ef3e6e0de5cb8938953 (diff)
downloadrockbox-e8db003465b28f1ff344edaac90c19d6586b937d.tar.gz
rockbox-e8db003465b28f1ff344edaac90c19d6586b937d.zip
Finally killed the nasty bug that caused all the dir-buffer-full errors for the newbies
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4372 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/settings.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 7b9c1feb60..55dcc0aa78 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -278,6 +278,11 @@ static int load_config_buffer( void )
}
#ifdef HAVE_RTC
+ if(!correct)
+ {
+ /* If the disk sector was incorrect, reinit the buffer */
+ memset(config_block, 0xff, CONFIG_BLOCK_SIZE);
+ }
/* read rtc block */
for (i=0; i < RTC_BLOCK_SIZE; i++ )
rtc_block[i] = rtc_read(0x14+i);