Jacek Caban : jscript: Fixed debugstr_variant for NULL argument.

Alexandre Julliard julliard at winehq.org
Thu Sep 17 13:52:54 CDT 2009


Module: wine
Branch: master
Commit: a94c25f3ae8e75d88a2553a4a8d414c7c2a9d3d8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=a94c25f3ae8e75d88a2553a4a8d414c7c2a9d3d8

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Sep 17 01:05:10 2009 +0200

jscript: Fixed debugstr_variant for NULL argument.

---

 dlls/jscript/jsutils.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c
index a51518c..cef141a 100644
--- a/dlls/jscript/jsutils.c
+++ b/dlls/jscript/jsutils.c
@@ -31,11 +31,14 @@ WINE_DECLARE_DEBUG_CHANNEL(heap);
 
 const char *debugstr_variant(const VARIANT *v)
 {
+    if(!v)
+        return "(null)";
+
     switch(V_VT(v)) {
     case VT_EMPTY:
-        return wine_dbg_sprintf("{VT_EMPTY}");
+        return "{VT_EMPTY}";
     case VT_NULL:
-        return wine_dbg_sprintf("{VT_NULL}");
+        return "{VT_NULL}";
     case VT_I4:
         return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v));
     case VT_R8:




More information about the wine-cvs mailing list