]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/bdes.c
Fix trailing whitespace
[empserver] / src / lib / commands / bdes.c
index 1bf068421e1c99b2828fe1ddd6abb72f6ab95bd4..967461dfca316835665707dd9d53df1c191ccbfc 100644 (file)
@@ -26,9 +26,9 @@
  *  ---
  *
  *  bdes.c: Change bmap designations
- * 
+ *
  *  Known contributors to this file:
- *     
+ *
  */
 
 #include <config.h>
@@ -47,25 +47,29 @@ bdes(void)
     char prompt[128];
     char buf[1024];
     int changed = 0;
+    int rc = RET_OK;
 
     if (!snxtsct(&nstr, player->argp[1]))
        return RET_SYN;
-    while (!player->aborted && nxtsct(&nstr, &sect)) {
+    while (nxtsct(&nstr, &sect)) {
        if ((nstr.ncond > 0) && (sect.sct_own != player->cnum))
            continue;
        d = player->map[sect.sct_uid];
        sprintf(prompt, "%s '%c'  desig? ",
                xyas(nstr.x, nstr.y, player->cnum),
                d ? d : ' ');
-       if ((p = getstarg(player->argp[2], prompt, buf)) == 0)
-           continue;
+       if ((p = getstarg(player->argp[2], prompt, buf)) == 0) {
+           rc = RET_FAIL;
+           break;
+       }
        if (!isprint(*p)) {
-           pr("Bad character. Must be printable!\n");
+           if (*p)
+               pr("Bad character. Must be printable!\n");
            continue;
        }
        changed |= map_set(player->cnum, nstr.x, nstr.y, *p, 2);
     }
     if (changed)
        writebmap(player->cnum);
-    return RET_OK;
+    return rc;
 }