From e8db003465b28f1ff344edaac90c19d6586b937d Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Sat, 13 Mar 2004 00:04:58 +0000 Subject: 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 --- apps/settings.c | 5 +++++ 1 file changed, 5 insertions(+) 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); -- cgit