From 4e92b0777c3ad32ca27c156d39eeb73e794efd03 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 c86e073d..d023fd89 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,"+");