From 0f0155fd0c9d717942e9602f1d1dd23132a4b357 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 4 Mar 2007 17:52:59 +0000 Subject: [PATCH] Disabling optimizations because one of them broke the combat asserts in round 512. Fixing a sprintf bug in building names --- src/common/kernel/battle.c | 3 ++- src/common/kernel/battle.h | 4 ++-- src/common/kernel/eressea.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index eb772dacc..40d84f88c 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -489,8 +489,9 @@ get_unitrow(const fighter * af, const side * vs) b->rowcache.result = get_row(af->side, row, vs); return b->rowcache.result; } -#else return b->rowcache.result; +#else + return get_row(af->side, row, vs); #endif } } diff --git a/src/common/kernel/battle.h b/src/common/kernel/battle.h index 389ec4195..58ba67177 100644 --- a/src/common/kernel/battle.h +++ b/src/common/kernel/battle.h @@ -70,7 +70,7 @@ extern "C" { #ifdef SMALL_BATTLE_MESSAGES boolean small; #endif -#define FASTROW +#undef FASTROW #ifdef FASTROW struct { const struct side * as; @@ -80,7 +80,7 @@ extern "C" { int result; } rowcache; #endif -#define FASTCOUNT +#undef FASTCOUNT #ifdef FASTCOUNT struct { struct side * side; diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index 6753dcb8c..5171787da 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -1820,7 +1820,7 @@ buildingname (const building * b) { char *ibuf = idbuf[(++nextbuf) % 8]; - snprintf(ibuf, sizeof(ibuf), "%s (%s)", strcheck(b->name, NAMESIZE), itoa36(b->no)); + snprintf(ibuf, sizeof(name), "%s (%s)", strcheck(b->name, NAMESIZE), itoa36(b->no)); ibuf[sizeof(name)-1] = 0; return ibuf; }