Fix off-by-one memory corruption in resistor plugin.

I'm wondering if that also was the cause
for the lines exactly next to it:

---------------------------------
     /* This cleans out the mysterious garbage that appears */
     rb->lcd_clear_display();
---------------------------------
-> Atleast I see no garbage in the sim.

Credit for this bug goes to "cppcheck".

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30345 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Jarosch 2011-08-25 19:18:20 +00:00
parent 697aa7f499
commit 59b8c7816f

View file

@ -801,8 +801,8 @@ static void resistance_to_color(void)
enum color units_used = 0;
char out_str[20];
for(i=0; i<=10; i++) { kbd_buffer[i] = 0; }
memset(kbd_buffer,0,sizeof(kbd_buffer));
/* This cleans out the mysterious garbage that appears */
rb->lcd_clear_display();
rb->splash(HZ/2, "Resistance to Colour");