winedbg: work around assert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



change log says it all
A+
Name:          wdg_symlen
ChangeLog:     replaced assert by simple if + warning message for too long symbols
License:       X11
GenDate:       2002/11/05 19:33:12 UTC
ModifiedFiles: programs/winedbg/hash.c
AddedFiles:    
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/programs/winedbg/hash.c,v
retrieving revision 1.2
diff -u -u -r1.2 hash.c
--- programs/winedbg/hash.c	16 Sep 2002 19:26:48 -0000	1.2
+++ programs/winedbg/hash.c	5 Nov 2002 19:32:52 -0000
@@ -389,10 +389,13 @@
    {
       char buffer[512];
 
-      assert(strlen(name) < sizeof(buffer) - 2); /* one for '_', one for '\0' */
-      buffer[0] = '_';
-      strcpy(buffer + 1, name);
-      num = DEBUG_GSV_Helper(buffer, lineno, value, NUMDBGV, bp_flag);
+      if (strlen(name) < sizeof(buffer) - 2) /* one for '_', one for '\0' */
+      {
+          buffer[0] = '_';
+          strcpy(buffer + 1, name);
+          num = DEBUG_GSV_Helper(buffer, lineno, value, NUMDBGV, bp_flag);
+      }
+      else DEBUG_Printf(DBG_CHN_WARN, "Way too long symbol (%s)\n", name);
    }
 
    /* now get the local symbols if any */

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux