From 6c963cad4eb978cd26ba611457bea4c512228228 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Wed, 13 Nov 2002 04:07:46 +0000 Subject: [PATCH] Actually exit loop on '\0' while printing a string. --- programs/winedbg/memory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/programs/winedbg/memory.c b/programs/winedbg/memory.c index 6cab892b669..10bc8fbf6f0 100644 --- a/programs/winedbg/memory.c +++ b/programs/winedbg/memory.c @@ -358,6 +358,7 @@ int DEBUG_PrintStringA(int chnl, const DBG_ADDR* address, int len) ach[l] = '\0'; /* protect from displaying junk */ l = strlen(ach); DEBUG_OutputA(chnl, ach, l); + if (l < sizeof(ach) - 1) break; lin += l; } return len - i; /* number of actually written chars */