Merge branch 'hotfix-3.4.1' of https://github.com/badgerman/eressea into badgerman-hotfix-3.4.1

Conflicts:
	src/buildno.h
	src/tests.c
This commit is contained in:
Enno Rehling 2015-02-08 10:50:31 +01:00
commit d7804b3556
4 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,3 @@
#define VERSION_MAJOR 3 #define VERSION_MAJOR 3
#define VERSION_MINOR 4 #define VERSION_MINOR 4
#define VERSION_BUILD 0 #define VERSION_BUILD 1

View File

@ -1896,7 +1896,10 @@ int name_cmd(struct unit *u, struct order *ord)
} }
if (s != NULL) { if (s != NULL) {
return rename_cmd(u, ord, s, getstrtoken()); const char *name = getstrtoken();
if (name) {
rename_cmd(u, ord, s, name);
}
} }
return 0; return 0;

View File

@ -240,7 +240,7 @@ const message_type *register_msg(const char *type, int n_param, ...) {
void assert_messages(struct CuTest * tc, struct mlist *msglist, const message_type **types, void assert_messages(struct CuTest * tc, struct mlist *msglist, const message_type **types,
int num_msgs, bool exact_match, ...) { int num_msgs, bool exact_match, ...) {
va_list args; va_list args;
int found = 0, argc = 0; int found, argc = -1;
struct message *msg; struct message *msg;
bool match = true; bool match = true;

View File

@ -263,6 +263,7 @@ void init_translations(const struct locale *lang, int ut, const char * (*string_
assert(maxstrings > 0); assert(maxstrings > 0);
tokens = get_translations(lang, ut); tokens = get_translations(lang, ut);
for (i = 0; i != maxstrings; ++i) { for (i = 0; i != maxstrings; ++i) {
// TODO: swap the name of s and key
const char * s = string_cb(i); const char * s = string_cb(i);
const char * key = s ? locale_string(lang, s, false) : 0; const char * key = s ? locale_string(lang, s, false) : 0;
key = key ? key : s; key = key ? key : s;