/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2014, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2017, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
|| (trade.trd_type == EF_NUKE)) {
while (1) {
p = getstring("Destination sector: ", buf);
- if (!trade_check_ok(&trade, &tg.gen))
+ if (!p)
return RET_FAIL;
- if (!p) {
+ if (!trade_check_ok(&trade, &tg.gen))
return RET_FAIL;
- }
if (!sarg_xy(p, &sx, &sy) || !getsect(sx, sy, §)) {
pr("Bad sector designation; try again!\n");
continue;
} else if (trade.trd_type == EF_LAND) {
while (1) {
p = getstring("Destination sector: ", buf);
- if (!trade_check_ok(&trade, &tg.gen))
+ if (!p)
return RET_FAIL;
- if (!p) {
+ if (!trade_check_ok(&trade, &tg.gen))
return RET_FAIL;
- }
if (!sarg_xy(p, &sx, &sy) || !getsect(sx, sy, §)) {
pr("Bad sector designation; try again!\n");
continue;