(news, fina): Report bad conditionals as syntax error. Closes #775475.
This commit is contained in:
parent
d1df194176
commit
c0618aec6e
2 changed files with 4 additions and 2 deletions
|
@ -57,13 +57,14 @@ fina(void)
|
||||||
pr("Loans are not enabled.\n");
|
pr("Loans are not enabled.\n");
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
}
|
}
|
||||||
|
if (!snxtitem(&ni, EF_LOAN, "*"))
|
||||||
|
return RET_SYN;
|
||||||
(void)time(&now);
|
(void)time(&now);
|
||||||
pr("\n");
|
pr("\n");
|
||||||
pr(" -= Empire Financial Status Report =- \n");
|
pr(" -= Empire Financial Status Report =- \n");
|
||||||
pr(" ");
|
pr(" ");
|
||||||
prdate();
|
prdate();
|
||||||
pr("Loan From To Rate Dur Paid Total\n");
|
pr("Loan From To Rate Dur Paid Total\n");
|
||||||
snxtitem(&ni, EF_LOAN, "*");
|
|
||||||
while (nxtitem(&ni, &loan)) {
|
while (nxtitem(&ni, &loan)) {
|
||||||
if (loan.l_status != LS_SIGNED)
|
if (loan.l_status != LS_SIGNED)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -65,6 +65,8 @@ news(void)
|
||||||
s_char num[128];
|
s_char num[128];
|
||||||
s_char *verb;
|
s_char *verb;
|
||||||
|
|
||||||
|
if (!snxtitem(&nstr, EF_NEWS, "*"))
|
||||||
|
return RET_SYN;
|
||||||
memset(page_has_news, 0, sizeof(page_has_news));
|
memset(page_has_news, 0, sizeof(page_has_news));
|
||||||
memset(sectors_taken, 0, sizeof(sectors_taken));
|
memset(sectors_taken, 0, sizeof(sectors_taken));
|
||||||
(void)head();
|
(void)head();
|
||||||
|
@ -86,7 +88,6 @@ news(void)
|
||||||
/* if (then < now - days(3))
|
/* if (then < now - days(3))
|
||||||
then = now - days(3);
|
then = now - days(3);
|
||||||
*/
|
*/
|
||||||
snxtitem(&nstr, EF_NEWS, "*");
|
|
||||||
pr("\nThe details of Empire news since %s", ctime(&then));
|
pr("\nThe details of Empire news since %s", ctime(&then));
|
||||||
while (nxtitem(&nstr, (s_char *)&nws)) {
|
while (nxtitem(&nstr, (s_char *)&nws)) {
|
||||||
if (nws.nws_when < then)
|
if (nws.nws_when < then)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue