forked from github/server
Merge branch 'master' of https://github.com/eressea/server
This commit is contained in:
commit
de5ef3f87b
|
@ -1,10 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<resources>
|
||||
|
||||
<resource name="money">
|
||||
<item weight="1"/>
|
||||
</resource>
|
||||
|
||||
<resource name="ao_healing" appearance="amulet">
|
||||
<item weight="0" score="6000"/>
|
||||
</resource>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1" ?>
|
||||
<items>
|
||||
</items>
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
10
src/laws.c
10
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);
|
||||
|
|
Loading…
Reference in New Issue