diff dwtest.c @ 1319:03f0bc85e7be

Code change to fix llvm-gcc optimization problem on Mac. long/int size difference in 64bit causing unexpected buffer overrun with optimization.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 05 Nov 2011 21:32:35 +0000
parents dbd507f42947
children d4c874f13e9b
line wrap: on
line diff
--- a/dwtest.c	Sat Nov 05 14:30:04 2011 +0000
+++ b/dwtest.c	Sat Nov 05 21:32:35 2011 +0000
@@ -1085,7 +1085,7 @@
     int z;
     CTIME time;
     CDATE date;
-    unsigned long size;
+    unsigned long size, newpoint;
     HICN thisicon;
 
     /* create a box to pack into the notebook page */
@@ -1161,7 +1161,8 @@
     mle_point = dw_mle_import(container_mle, buffer, mle_point);
     dw_mle_delete(container_mle, 9, 3);
     mle_point = dw_mle_import(container_mle, "gh", 12);
-    dw_mle_get_size(container_mle, (unsigned long*)&mle_point, NULL);
+    dw_mle_get_size(container_mle, &newpoint, NULL);
+    mle_point = (int)newpoint;
     sprintf(buffer, "[%d]\r\n\r\n", mle_point);
     mle_point = dw_mle_import(container_mle, buffer, mle_point);
     dw_mle_set_cursor(container_mle, mle_point);