diff --git a/debugger/memory.c b/debugger/memory.c
index 6ccf6c343590cca460945e4560600b5bf472aad1..453e3e0218a6693fc931753466bbc877b4d9fc44 100644
--- a/debugger/memory.c
+++ b/debugger/memory.c
@@ -262,7 +262,7 @@ void DEBUG_ExamineMemory( const DBG_VALUE *_value, int count, char format )
 		if (count == 1) count = 256;
                 while (count--)
                 {
-		    if (!DEBUG_READ_MEM_VERBOSE(pnt, &wch, sizeof(wch)))
+		    if (!DEBUG_READ_MEM_VERBOSE(pnt, &wch, sizeof(wch)) || !wch)
 		       break;
                     pnt += sizeof(wch);
                     DEBUG_Printf(DBG_CHN_MESG, "%c", (char)wch);
@@ -276,7 +276,7 @@ void DEBUG_ExamineMemory( const DBG_VALUE *_value, int count, char format )
 		if (count == 1) count = 256;
                 while (count--)
                 {
-                    if (!DEBUG_READ_MEM_VERBOSE(pnt, &ch, sizeof(ch)))
+                    if (!DEBUG_READ_MEM_VERBOSE(pnt, &ch, sizeof(ch)) || !ch)
 		       break;
                     pnt++;
                     DEBUG_Output(DBG_CHN_MESG, &ch, 1);