From 3350079a799e9b685d829c720f2b875b27d1ff47 Mon Sep 17 00:00:00 2001 From: tjg Date: Wed, 27 Nov 2002 10:23:26 +0000 Subject: Bug: history dumps core if more colons than substitutions (thanks Callum Gibson). --- history.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'history.c') diff --git a/history.c b/history.c index 2993a69..8be90ec 100644 --- a/history.c +++ b/history.c @@ -78,6 +78,8 @@ static char *sub(char *s, char *old, char *new) { char *t, *u; t = isin(s, old); + if (!t) + return s; u = newstr(); *t = '\0'; -- cgit v1.2.3