let horses be short, too.

This commit is contained in:
Enno Rehling 2019-08-03 20:58:13 +02:00
parent 8106cf15a1
commit c97e881dbf
2 changed files with 6 additions and 2 deletions

View File

@ -643,7 +643,11 @@ void rsethorses(const region * r, int value)
assert(r->land || value==0);
assert(value >= 0);
if (r->land) {
r->land->horses = value;
if (value > USHRT_MAX) {
log_warning("region %s cannot have %d horses.", regionname(r, NULL), value);
value = USHRT_MAX;
}
r->land->horses = (unsigned short)value;
}
}

View File

@ -97,12 +97,12 @@ extern "C" {
char *display;
demand *demands;
const struct item_type *herbtype;
unsigned short horses;
unsigned short herbs;
unsigned short peasants;
unsigned short morale;
short newpeasants;
int trees[3]; /* 0 -> seeds, 1 -> shoots, 2 -> trees */
int horses;
int money;
struct region_owner *ownership;
} land_region;