From 0c99b4ff75de5727280c40f4b1597526e32b91c8 Mon Sep 17 00:00:00 2001 From: danw Date: Thu, 28 May 1998 14:45:10 +0000 Subject: [PATCH] another constant-string fix for strtrim (makes strtrim("") work) --- lib/strs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/strs.c b/lib/strs.c index 18d9d8e5..8b3d3cee 100644 --- a/lib/strs.c +++ b/lib/strs.c @@ -27,7 +27,8 @@ char *strtrim(char *save) /* skip to end of string */ if (*s == '\0') { - *save = '\0'; + if (*save) + *save = '\0'; return save; } -- 2.45.1