forked from github/server
create races with a minimum of hitpoints so tests don't break.
This commit is contained in:
parent
8fca34e824
commit
315066309a
1 changed files with 3 additions and 1 deletions
|
@ -99,7 +99,9 @@ void racelist_insert(struct race_list **rl, const struct race *r)
|
||||||
race *rc_new(const char *zName)
|
race *rc_new(const char *zName)
|
||||||
{
|
{
|
||||||
char zBuffer[80];
|
char zBuffer[80];
|
||||||
race *rc = calloc(sizeof(race), 1);
|
race *rc = (race *)calloc(sizeof(race), 1);
|
||||||
|
|
||||||
|
rc->hitpoints = 1;
|
||||||
if (strchr(zName, ' ') != NULL) {
|
if (strchr(zName, ' ') != NULL) {
|
||||||
log_error(("race '%s' has an invalid name. remove spaces\n", zName));
|
log_error(("race '%s' has an invalid name. remove spaces\n", zName));
|
||||||
assert(strchr(zName, ' ') == NULL);
|
assert(strchr(zName, ' ') == NULL);
|
||||||
|
|
Loading…
Reference in a new issue