Strange crash

eric pouech eric.pouech at wanadoo.fr
Thu Apr 19 16:22:42 CDT 2001


> Also I don't understand why winedbg prints dc->xformWorld2Vport.eM11 = 0.0,
> though dc->xformWorld2Vport.eM11 is always 1.0 in the log trace (added to
> X11DRV_PEN_SelectObject right before the GDI_ROUND call).
well, that's a bug in the debugger...
in fact, the debugger passes a float (strictly as a float) to a printf
function, 
which expects a double argument, hence the error
this should be a simple fix... let me know if this works better

Index: debugger/info.c
===================================================================
RCS file: /usr/share/cvs/cvsroot/wine/wine/debugger/info.c,v
retrieving revision 1.17
diff -u -r1.17 info.c
--- debugger/info.c     2000/12/29 05:38:00     1.17
+++ debugger/info.c     2001/04/19 21:19:40
@@ -68,8 +68,18 @@
        {
          if (strstr(default_format, "%S") == NULL)
            {
+              /* float type has to be promoted as a double */
+              /* value.type->un.basic.basic_type == BASIC_FLT */
+              if (strstr(default_format, "%f") != NULL)
+                 {
+                    float f;
+                    double d;
+                    memcpy(&f, &res, sizeof(f));
+                    d = (double)f;
+                    memcpy(&res, &d, sizeof(res));
+                 }
               DEBUG_nchar += DEBUG_Printf( DBG_CHN_MESG,
default_format, res );
-           }
+           }
          else
            {
               char*   
ptr;                                                                                                                                                      
-- 
---------------
Eric Pouech (http://perso.wanadoo.fr/eric.pouech/)
"The future will be better tomorrow", Vice President Dan Quayle




More information about the wine-devel mailing list