diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/hist.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/hist.c b/Src/hist.c index f7e53de74..901cd3b1a 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -1198,8 +1198,9 @@ histreduceblanks(void) chline[pos] = '\0'; } else { ptr = chline + pos; - while ((*ptr++ = *lastptr++)) - ; + if (ptr < lastptr) + while ((*ptr++ = *lastptr++)) + ; } } |