forked from github/server
- spelling error in message fail_tooheavy
- crashed when message couldn't be created
This commit is contained in:
parent
16f28a3d99
commit
6298a3a165
|
@ -17,8 +17,8 @@ if ! $(CCACHE_DIR) {
|
||||||
|
|
||||||
if $(PROFILE) = 1 {
|
if $(PROFILE) = 1 {
|
||||||
Echo Compiling with profiler ;
|
Echo Compiling with profiler ;
|
||||||
CCFLAGS += -pg ;
|
CCFLAGS += -pg -g ;
|
||||||
LINKFLAGS += -pg ;
|
LINKFLAGS += -pg -g ;
|
||||||
}
|
}
|
||||||
|
|
||||||
CCFLAGS += -Wall ;
|
CCFLAGS += -Wall ;
|
||||||
|
|
|
@ -68,7 +68,7 @@ extern const struct messageclass * mc_find(const char * name);
|
||||||
/* convenience, deprecated */
|
/* convenience, deprecated */
|
||||||
extern struct message * new_message(struct faction * receiver, const char * signature, ...);
|
extern struct message * new_message(struct faction * receiver, const char * signature, ...);
|
||||||
|
|
||||||
#define ADDMSG(msgs, mcreate) { message * m = mcreate; assert (m->refcount==1); if (m) { add_message(msgs, m); msg_release(m); } }
|
#define ADDMSG(msgs, mcreate) { message * m = mcreate; if (m) { assert(m->refcount>=1); add_message(msgs, m); msg_release(m); } }
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -938,7 +938,7 @@ seen_done(void)
|
||||||
seen_region *
|
seen_region *
|
||||||
find_seen(const region * r)
|
find_seen(const region * r)
|
||||||
{
|
{
|
||||||
int index = abs((r->x & 0xffff) + ((r->y) << 16)) % MAXSEEHASH;
|
int index = ((int)r) % MAXSEEHASH;
|
||||||
seen_region * find=seehash[index];
|
seen_region * find=seehash[index];
|
||||||
while (find) {
|
while (find) {
|
||||||
if (find->r==r) return find;
|
if (find->r==r) return find;
|
||||||
|
@ -952,7 +952,7 @@ add_seen(const struct region * r, unsigned char mode, boolean dis)
|
||||||
{
|
{
|
||||||
seen_region * find = find_seen(r);
|
seen_region * find = find_seen(r);
|
||||||
if (find==NULL) {
|
if (find==NULL) {
|
||||||
int index = abs((r->x & 0xffff) + ((r->y) << 16)) % MAXSEEHASH;
|
int index = ((int)r) % MAXSEEHASH;
|
||||||
if (!reuse) reuse = (seen_region*)calloc(1, sizeof(struct seen_region));
|
if (!reuse) reuse = (seen_region*)calloc(1, sizeof(struct seen_region));
|
||||||
find = reuse;
|
find = reuse;
|
||||||
reuse = reuse->nextHash;
|
reuse = reuse->nextHash;
|
||||||
|
|
|
@ -968,7 +968,7 @@ fix_astralplane(void)
|
||||||
if (ra->units!=NULL) {
|
if (ra->units!=NULL) {
|
||||||
add_regionlist(&rlist, ra);
|
add_regionlist(&rlist, ra);
|
||||||
}
|
}
|
||||||
log_printf("protecting firewall in %s by blocking astral space in %s.\n", regionname(r), regionname(ra));
|
log_printf("protecting firewall in %s by blocking astral space in %s.\n", regionname(r, NULL), regionname(ra, NULL));
|
||||||
terraform(ra, T_ASTRALB);
|
terraform(ra, T_ASTRALB);
|
||||||
}
|
}
|
||||||
while (rlist!=NULL) {
|
while (rlist!=NULL) {
|
||||||
|
|
|
@ -5968,7 +5968,7 @@
|
||||||
<text locale="en">"$unit($unit) disappears."</text>
|
<text locale="en">"$unit($unit) disappears."</text>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message name="fail_toheavy" section="errors">
|
<message name="fail_tooheavy" section="errors">
|
||||||
<type>
|
<type>
|
||||||
<arg name="command" type="order"/>
|
<arg name="command" type="order"/>
|
||||||
<arg name="region" type="region"/>
|
<arg name="region" type="region"/>
|
||||||
|
|
Loading…
Reference in New Issue