Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: [Ethereal-dev] Unprintable chars in hex dump on Windows

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Chris Heath <chris@xxxxxxxxxxxxxx>
Date: Thu, 31 Jul 2003 19:32:59 -0400
I noticed that some unprintable characters are sneaking into the hex
dump pane on Windows.  The patch below should fix that.

(I haven't compiled or tested it, but it's so trivial I'm sure it'll
work.)

Chris


--- ethereal.old/gtk/gtkglobals.h	2003-07-31 19:13:46.000000000 -0400
+++ ethereal/gtk/gtkglobals.h	2003-07-31 19:15:28.000000000 -0400
@@ -50,7 +50,7 @@
  * the problem by escaping all characters that aren't printable ASCII.
  */
 #undef isprint
-#define isprint(c) (c >= 0x20 && c <= 0x7f)
+#define isprint(c) (c >= 0x20 && c < 0x7f)
 #endif
 
 #endif
--- ethereal.old/epan/strutil.c	2003-07-31 19:13:38.000000000 -0400
+++ ethereal/epan/strutil.c	2003-07-31 19:14:42.000000000 -0400
@@ -182,7 +182,7 @@
      * printouts) on all platforms including Windows, we work around
      * the problem by escaping all characters that aren't printable ASCII.
      */
-    if (c >= 0x20 && c <= 0x7f) {
+    if (c >= 0x20 && c < 0x7f) {
 #else
     if (isprint(c)) {
 #endif