]> git.pond.sub.org Git - empserver/commitdiff
(fly): Failed to re-get target sector after asking for cargo, and thus
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 13 Aug 2004 21:00:11 +0000 (21:00 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 13 Aug 2004 21:00:11 +0000 (21:00 +0000)
passed potentially invalid argument to pln_onewaymission().

src/lib/commands/fly.c

index 18a273d56b81f57292ec878afb39e6675925d47f..724a65773c58d576b163f18cf9df02f3749a3fcc 100644 (file)
@@ -101,6 +101,7 @@ fly(void)
     getsect(tx, ty, &target);
     cno = -1;
     ip = whatitem(player->argp[5], "transport what? ");
+    getsect(tx, ty, &target);
     mission_flags = 0;
     if (pln_onewaymission(&target, &cno, &wantflags) < 0)
        return RET_SYN;
@@ -141,16 +142,14 @@ fly(void)
     tech = 0;
     mission_flags |= P_X;      /* stealth (shhh) */
     mission_flags |= P_H;      /* gets turned off if not all choppers */
-    mission_flags =
-       pln_arm(&bomb_list, ap_to_target, 't', ip, 0, mission_flags,
-               &tech);
+    mission_flags = pln_arm(&bomb_list, ap_to_target, 't',
+                           ip, 0, mission_flags, &tech);
     if (QEMPTY(&bomb_list)) {
        pr("No planes could be equipped for the mission.\n");
        return RET_FAIL;
     }
-    mission_flags =
-       pln_arm(&esc_list, ap_to_target, 't', ip, P_ESC | P_F,
-               mission_flags, &tech);
+    mission_flags = pln_arm(&esc_list, ap_to_target, 't',
+                           ip, P_ESC | P_F, mission_flags, &tech);
     ac_encounter(&bomb_list, &esc_list, ax, ay, flightpath, mission_flags,
                 0, 0, 0);
     if (QEMPTY(&bomb_list)) {