--- checkpw-1.02.orig/checkapoppw.c
+++ checkpw-1.02/checkapoppw.c
@@ -88,7 +88,7 @@ main(int argc,char **argv)
     pw = getpwnam(login);
     if (pw) break;
     if (errno == error_txtbsy) die(111);
-    for (; ext != login && *ext != '-'; --ext);
+    do {--ext;} while (ext != login && *ext != '-');
     if (ext == login) die(1);
     if (i) login[i] = '-';
     i = ext - login;
--- checkpw-1.02.orig/checkpw.c
+++ checkpw-1.02/checkpw.c
@@ -74,7 +74,7 @@ main(int argc,char **argv)
     pw = getpwnam(login);
     if (pw) break;
     if (errno == error_txtbsy) die(111);
-    for (; ext != login && *ext != '-'; --ext);
+    do {--ext;} while (ext != login && *ext != '-');
     if (ext == login) die(1);
     if (i) login[i] = '-';
     i = ext - login;
