]> andersk Git - moira.git/commitdiff
another constant-string fix for strtrim (makes strtrim("") work)
authordanw <danw>
Thu, 28 May 1998 14:45:10 +0000 (14:45 +0000)
committerdanw <danw>
Thu, 28 May 1998 14:45:10 +0000 (14:45 +0000)
lib/strs.c

index 18d9d8e5dec6b31e732745cc59d849b87c9b9221..8b3d3ceeb7b756f51eb83e68e34c3ba3377c8de4 100644 (file)
@@ -27,7 +27,8 @@ char *strtrim(char *save)
   /* skip to end of string */
   if (*s == '\0')
     {
-      *save = '\0';
+      if (*save)
+       *save = '\0';
       return save;
     }
 
This page took 0.038143 seconds and 5 git commands to generate.