bugfix build-message

This commit is contained in:
Enno Rehling 2001-02-04 10:04:51 +00:00
parent 97b14a079c
commit fefa6f7bce

View file

@ -1,6 +1,6 @@
/* vi: set ts=2: /* vi: set ts=2:
* *
* $Id: build.c,v 1.5 2001/02/04 08:52:24 enno Exp $ * $Id: build.c,v 1.6 2001/02/04 10:04:51 enno Exp $
* Eressea PB(E)M host Copyright (C) 1998-2000 * Eressea PB(E)M host Copyright (C) 1998-2000
* Christian Schlittchen (corwin@amber.kn-bremen.de) * Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de)
@ -718,9 +718,10 @@ build_building(unit * u, const building_type * btype, int want)
case ENOMATERIALS: { case ENOMATERIALS: {
/* something missing from the list of materials */ /* something missing from the list of materials */
const construction * cons = btype->construction; const construction * cons = btype->construction;
char * ch = buf+strlen(buf); char * ch;
assert(cons); assert(cons);
strcpy(buf, "Dafür braucht man mindestens:"); strcpy(buf, "Dafür braucht man mindestens:");
ch = buf+strlen(buf);
for (c=0;cons->materials[c].number; c++) { for (c=0;cons->materials[c].number; c++) {
int n; int n;
if (c!=0) strcat(ch++, ","); if (c!=0) strcat(ch++, ",");