Fixed bug: "Not clearing the buffer causes a problem when switching from one WPS to another if they don't use the same image set."

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6866 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Tomas Salfischberger 2005-06-25 17:34:05 +00:00
parent f08a4ca028
commit af50cae14d

View file

@ -219,6 +219,16 @@ bool wps_load(const char* file, bool display)
if (numread > 0)
{
#ifdef HAVE_LCD_BITMAP
/* reset image buffer */
img_buf_ptr = img_buf;
img_buf_free = IMG_BUFSIZE;
/* set images to unloaded */
for (i = 0; i < MAX_IMAGES; i++) {
img[i].loaded = false;
}
#endif
buffer[numread] = 0;
wps_format(buffer);
}