Fehler bei neuem itemlisten-argument

This commit is contained in:
Enno Rehling 2006-01-21 18:10:46 +00:00
parent 9c8eb1028f
commit 5dd2542586
2 changed files with 3 additions and 2 deletions

View file

@ -413,7 +413,7 @@ cr_resources(variant var, char * buffer, const void * userdata)
resource * rlist = (resource*)var.v; resource * rlist = (resource*)var.v;
char * wp = buffer; char * wp = buffer;
if (rlist!=NULL) { if (rlist!=NULL) {
wp += sprintf(wp, "%d %s", rlist->number, wp += sprintf(wp, "\"%d %s", rlist->number,
resourcename(rlist->type, rlist->number!=1)); resourcename(rlist->type, rlist->number!=1));
for (;;) { for (;;) {
rlist = rlist->next; rlist = rlist->next;
@ -421,6 +421,7 @@ cr_resources(variant var, char * buffer, const void * userdata)
wp += sprintf(wp, ", %d %s", rlist->number, wp += sprintf(wp, ", %d %s", rlist->number,
resourcename(rlist->type, rlist->number!=1)); resourcename(rlist->type, rlist->number!=1));
} }
strcat(wp, "\"");
} }
return 0; return 0;
} }

View file

@ -889,7 +889,7 @@ build_building(unit * u, const building_type * btype, int want, order * ord)
res->number = cons->materials[c].number / cons->reqsize; res->number = cons->materials[c].number / cons->reqsize;
res->type = cons->materials[c].rtype; res->type = cons->materials[c].rtype;
res->next = reslist; res->next = reslist;
reslist = res->next; reslist = res;
} }
ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "build_required", ADDMSG(&u->faction->msgs, msg_feedback(u, ord, "build_required",
"required", reslist)); "required", reslist));