compilation fixes

This commit is contained in:
Enno Rehling 2007-06-27 01:03:46 +00:00
parent 588c136071
commit 0a997cadcd
2 changed files with 18 additions and 19 deletions

View File

@ -815,7 +815,6 @@ build_building(unit * u, const building_type * btype, int want, order * ord)
int n = want, built = 0, id; int n = want, built = 0, id;
building * b = NULL; building * b = NULL;
/* einmalige Korrektur */ /* einmalige Korrektur */
static char buffer[8 + IDSIZE + 1 + NAMESIZE + 1];
const xmlChar * btname; const xmlChar * btname;
order * new_order = NULL; order * new_order = NULL;
const struct locale * lang = u->faction->locale; const struct locale * lang = u->faction->locale;
@ -994,7 +993,6 @@ build_ship(unit * u, ship * sh, int want)
void void
create_ship(region * r, unit * u, const struct ship_type * newtype, int want, order * ord) create_ship(region * r, unit * u, const struct ship_type * newtype, int want, order * ord)
{ {
static char buffer[IDSIZE + 2 * KEYWORDSIZE + 3];
ship *sh; ship *sh;
int msize; int msize;
const construction * cons = newtype->construction; const construction * cons = newtype->construction;

View File

@ -440,12 +440,13 @@ new_building(const struct building_type * btype, region * r, const struct locale
addlist(&r->buildings, b); addlist(&r->buildings, b);
{ {
static char buffer[IDSIZE + 1 + NAMESIZE + 1]; const xmlChar * bname;
if (b->type->name) if (b->type->name==NULL) {
sprintf(buffer, "%s", locale_string(lang, btype->_name)); bname = LOC(lang, btype->_name);
else } else {
sprintf(buffer, "%s", LOC(lang, buildingtype(btype, b, 0))); bname = LOC(lang, buildingtype(btype, b, 0));
set_string(&b->name, buffer); }
set_string(&b->name, bname);
} }
return b; return b;
} }