forked from github/server
Memory-Overwrite
This commit is contained in:
parent
35867d3a5c
commit
1909d754b1
|
@ -1374,8 +1374,8 @@ manufacture(unit * u, const item_type * itype, int want)
|
|||
if (n>0) {
|
||||
i_change(&u->items, itype, n);
|
||||
if (want==INT_MAX) want = n;
|
||||
add_message(&u->faction->msgs,
|
||||
new_message(u->faction, "manufacture%u:unit%r:region%i:amount%i:wanted%X:resource", u, u->region, n, want, itype->rtype));
|
||||
ADDMSG(&u->faction->msgs, msg_message("manufacture",
|
||||
"unit region amount wanted resource", u, u->region, n, want, itype->rtype));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1807,8 +1807,8 @@ create_potion(unit * u, const potion_type * ptype, int want)
|
|||
default:
|
||||
i_change(&u->items, ptype->itype, built);
|
||||
if (want==INT_MAX) want = built;
|
||||
add_message(&u->faction->msgs,
|
||||
new_message(u->faction, "manufacture%u:unit%r:region%i:amount%i:wanted%X:resource", u, u->region, built, want, ptype->itype->rtype));
|
||||
ADDMSG(&u->faction->msgs, msg_message(u->faction, "manufacture",
|
||||
"unit region amount wanted resource", u, u->region, built, want, ptype->itype->rtype));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3004,7 +3004,7 @@ make_summary(boolean count_new)
|
|||
struct language * plang = s->languages;
|
||||
while (plang && plang->locale != lang) plang=plang->next;
|
||||
if (!plang) {
|
||||
plang = calloc(sizeof(plang), 1);
|
||||
plang = calloc(sizeof(struct language), 1);
|
||||
plang->next = s->languages;
|
||||
s->languages = plang;
|
||||
plang->locale = lang;
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
#ifndef MESSAGE_H
|
||||
#define MESSAGE_H
|
||||
|
||||
struct faction;
|
||||
struct warning;
|
||||
#include <util/message.h>
|
||||
|
||||
struct message;
|
||||
struct messageclass;
|
||||
struct faction;
|
||||
struct warning;
|
||||
struct msglevel;
|
||||
|
||||
|
|
|
@ -2751,6 +2751,7 @@ heal_all(void)
|
|||
region *r;
|
||||
unit *u;
|
||||
faction *f;
|
||||
struct message * msg = msg_message("healall", "");
|
||||
|
||||
for(f=factions; f; f=f->next) {
|
||||
freset(f, FL_DH);
|
||||
|
@ -2766,13 +2767,15 @@ heal_all(void)
|
|||
}
|
||||
}
|
||||
|
||||
for(f=factions; f; f=f->next) {
|
||||
for (f=factions; f; f=f->next) {
|
||||
if(fval(f,FL_DH)) {
|
||||
add_message(&f->msgs, new_message(f, "healall"));
|
||||
add_message(&f->msgs, msg);
|
||||
freset(f, FL_DH);
|
||||
}
|
||||
}
|
||||
|
||||
msg_release(msg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue