diff --git a/src/kernel/battle.c b/src/kernel/battle.c index 3fd771f96..e10b4378f 100644 --- a/src/kernel/battle.c +++ b/src/kernel/battle.c @@ -4262,11 +4262,6 @@ void do_battle(region * r) } } -void battle_init(battle * b) { - assert(b); - memset(b, 0, sizeof(battle)); -} - void battle_free(battle * b) { side *s; diff --git a/src/keyword.c b/src/keyword.c index a30bbb66d..20d8941aa 100644 --- a/src/keyword.c +++ b/src/keyword.c @@ -110,6 +110,7 @@ const char *keywords[MAXKEYWORDS] = { "teach", "study", "make", + "maketemp", "move", "password", "recruit", diff --git a/src/keyword.h b/src/keyword.h index 8d2ce4932..8577d682e 100644 --- a/src/keyword.h +++ b/src/keyword.h @@ -36,6 +36,7 @@ typedef enum { K_TEACH, K_STUDY, K_MAKE, + K_MAKETEMP, K_MOVE, K_PASSWORD, K_RECRUIT, diff --git a/src/report.c b/src/report.c index b4a7a9bcd..0fa72afd5 100644 --- a/src/report.c +++ b/src/report.c @@ -1412,13 +1412,16 @@ static void durchreisende(FILE * F, const region * r, const faction * f) } } /* TODO: finish localization */ - if (maxtravel == 1) { - bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_one")); - } else { - bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_many")); + if (size>0) { + if (maxtravel == 1) { + bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_one")); + } + else { + bytes = _snprintf(bufp, size, " %s", LOC(f->locale, "has_moved_many")); + } + if (wrptr(&bufp, &size, bytes) != 0) + WARN_STATIC_BUFFER(); } - if (wrptr(&bufp, &size, bytes) != 0) - WARN_STATIC_BUFFER(); *bufp = 0; rparagraph(F, buf, 0, 0, 0); } @@ -1648,7 +1651,7 @@ show_allies(const faction * f, const ally * allies, char *buf, size_t size) if (wrptr(&bufp, &size, bytes) != 0) WARN_STATIC_BUFFER(); if ((mode & HELP_ALL) == HELP_ALL) { - bytes = (int)strlcpy(bufp, "Alles", size); + bytes = (int)strlcpy(bufp, locale_string(f->locale, parameters[P_ANY]), size); if (wrptr(&bufp, &size, bytes) != 0) WARN_STATIC_BUFFER(); } else { diff --git a/src/util/bsdstring.c b/src/util/bsdstring.c index 0f8b60ffe..0f37ac71a 100644 --- a/src/util/bsdstring.c +++ b/src/util/bsdstring.c @@ -9,8 +9,6 @@ int wrptr(char **ptr, size_t * size, int bytes) { - assert(bytes >= 0 || !"you're not using _snprintf right, maybe?"); - if (bytes == 0) { return 0; }