From 9e6fe01229e0ef4c0de5746f988f6a3c79b2f792 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 11 Dec 1986 17:04:40 +0000 Subject: [PATCH] Improved testing for 0-strings in the routine "mycat". --- mach/proto/ncg/compute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mach/proto/ncg/compute.c b/mach/proto/ncg/compute.c index c86e073d3..d023fd892 100644 --- a/mach/proto/ncg/compute.c +++ b/mach/proto/ncg/compute.c @@ -86,8 +86,8 @@ string salloc(),strcpy(),strcat(); string mycat(s1,s2) register string s1,s2; { register string s; - if (s1==0) return(s2); - if (s2==0) return(s1); + if (s1==0 || *s1=='\0') return(s2); + if (s2==0 || *s2=='\0') return(s1); s=salloc(strlen(s1)+strlen(s2)+1); strcpy(s,s1); strcat(s,"+"); -- 2.34.1