handle 0 return of crypt
authorSzabolcs Nagy <nsz@port70.net>
Thu, 9 Apr 2015 00:22:42 +0000 (00:22 +0000)
committerSzabolcs Nagy <nsz@port70.net>
Thu, 9 Apr 2015 00:22:42 +0000 (00:22 +0000)
src/functional/crypt.c

index c23a1f9..9629651 100644 (file)
@@ -5,6 +5,7 @@
 static char *p;
 
 #define T(h,s,k) p = crypt(k,s); \
+ if (!p) p ="*"; \
  if (strcmp(p,h)!=0) t_error("crypt(%s, \"%s\") failed: got \"%s\" want \"%s\"\n", #k, s, p, h);
 
 int main()