summary refs log tree commit diff
path: root/bin/1sh/mail.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/1sh/mail.c')
-rw-r--r--bin/1sh/mail.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/1sh/mail.c b/bin/1sh/mail.c
index 8c6b59ae..01b370c6 100644
--- a/bin/1sh/mail.c
+++ b/bin/1sh/mail.c
@@ -87,7 +87,8 @@ chkmail(int silent)
 		p = mpath;
 		if (*p == '\0')
 			break;
-		mpath = strchrnul(mpath, ':');
+		mpath = strchr(p, ':');
+		if (!mpath) mpath = strchr(p, '\0');
 		if (*mpath != '\0') {
 			*mpath++ = '\0';
 			if (p == mpath - 1)