diff --git a/res/core/common/items.xml b/res/core/common/items.xml index c8910e695..d867a3126 100644 --- a/res/core/common/items.xml +++ b/res/core/common/items.xml @@ -1,10 +1,6 @@ - - - - diff --git a/res/items.xml b/res/items.xml new file mode 100644 index 000000000..e8fa7246a --- /dev/null +++ b/res/items.xml @@ -0,0 +1,3 @@ + + + diff --git a/s/cron/previews.sh b/s/cron/previews.sh index fc9f5f70b..0e9a3e0e6 100755 --- a/s/cron/previews.sh +++ b/s/cron/previews.sh @@ -1,8 +1,9 @@ #!/bin/bash - -s/preview build master -s/preview version +[ -z $ERESSEA ] && ERESSEA=$HOME/eressea +SRC=$ERESSEA/git +$SRC/s/preview build master +$SRC/s/preview version for game in 2 3 4 ; do - s/preview -g $game run && \ - s/preview -g $game send + $SRC/s/preview -g $game run && \ + $SRC/s/preview -g $game send done diff --git a/src/economy.c b/src/economy.c index 924b4f286..940fec4f8 100644 --- a/src/economy.c +++ b/src/economy.c @@ -2766,7 +2766,7 @@ static void breed_cmd(unit * u, struct order *ord) (void)init_order(ord); s = getstrtoken(); - m = atoi((const char *)s); + m = s ? atoi((const char *)s) : 0; if (m != 0) { /* first came a want-paramter */ s = getstrtoken(); @@ -2775,7 +2775,7 @@ static void breed_cmd(unit * u, struct order *ord) m = INT_MAX; } - if (!s[0]) { + if (!s || !s[0]) { p = P_ANY; } else { diff --git a/src/kernel/order.c b/src/kernel/order.c index 63048626b..f7e94a2aa 100644 --- a/src/kernel/order.c +++ b/src/kernel/order.c @@ -544,7 +544,8 @@ char *write_order(const order * ord, char *buffer, size_t size) keyword_t kwd = ORD_KEYWORD(ord); if (kwd == NOKEYWORD) { const char *text = ORD_STRING(ord); - strlcpy(buffer, (const char *)text, size); + if (text) strlcpy(buffer, (const char *)text, size); + else buffer[0] = 0; } else { get_command(ord, buffer, size); diff --git a/src/laws.c b/src/laws.c index 559422642..db48dde0b 100755 --- a/src/laws.c +++ b/src/laws.c @@ -3923,10 +3923,14 @@ void defaultorders(void) order *ord = *ordp; if (getkeyword(ord) == K_DEFAULT) { char lbuf[8192]; - order *new_order; + order *new_order = 0; + const char *s; init_order(ord); - strcpy(lbuf, getstrtoken()); - new_order = parse_order(lbuf, u->faction->locale); + s = getstrtoken(); + if (s) { + strcpy(lbuf, s); + new_order = parse_order(lbuf, u->faction->locale); + } *ordp = ord->next; ord->next = NULL; free_order(ord);