]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/swap.c
Fix swapsector not to wipe out concurrent updates.
[empserver] / src / lib / commands / swap.c
index e8c9d854e9c61e4004b0a82699e4963c86c59cac..d7c75f5fb7be5a28a67b801cbd5340bf0048b61a 100644 (file)
@@ -59,6 +59,8 @@ swaps(void)
     print_res(&sectb);
     if (!confirm ("Are you sure these are the two sectors you wish to swap? "))
        return RET_FAIL;
+    if (!check_sect_ok(&secta) || !check_sect_ok(&sectb))
+       return RET_FAIL;
     tmp = secta;
     /* change the location of secta to that of sectb */
     secta.sct_x = sectb.sct_x;