LCD LIB

Dependents:   HagridOS5

Fork of RA8875 by David Smart

Revision:
120:be2aaa3adf72
Parent:
119:d129b798f82f
Child:
121:6bc4911f5e55
diff -r d129b798f82f -r be2aaa3adf72 GraphicsDisplay.cpp
--- a/GraphicsDisplay.cpp	Mon May 16 21:30:35 2016 +0000
+++ b/GraphicsDisplay.cpp	Mon May 16 22:31:13 2016 +0000
@@ -408,11 +408,13 @@
     if (!fh)
         return(file_not_found);
     
-    INFO("RenderJpegFile(%d,%d,%s)", x,y, Name_JPG);
+    //INFO("RenderJpegFile(%d,%d,%s)", x,y, Name_JPG);
     work = (uint16_t *)malloc(JPEG_WORK_SPACE_SIZE/sizeof(uint16_t));
     if (work) {
         jdec = (JDEC *)malloc(sizeof(JDEC));
         if (jdec) {
+            memset(work, 0, JPEG_WORK_SPACE_SIZE/sizeof(uint16_t));
+            memset(jdec, 0, sizeof(JDEC));
             r = (RetCode_t)jd_prepare(jdec, NULL, work, JPEG_WORK_SPACE_SIZE, fh);
             INFO("jd_prepare returned %d", r);