From 72d0596bec86f0f09249e4b1a9f7e4ef0ee373b5 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 15 Apr 2007 08:01:12 +0000 Subject: [PATCH] strcmp() bugfixes --- src/common/gamecode/laws.c | 4 ++-- src/scripts/eressea/xmas2006.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/gamecode/laws.c b/src/common/gamecode/laws.c index fd40ed125..1da846350 100644 --- a/src/common/gamecode/laws.c +++ b/src/common/gamecode/laws.c @@ -2128,7 +2128,7 @@ display_item(faction *f, unit *u, const item_type * itype) key = mkname("iteminfo", name); info = locale_getstring(f->locale, key); - if (info==key || strcmp(info, key)==0) { + if (info==NULL || info==key || strcmp(info, key)==0) { info = locale_string(f->locale, mkname("iteminfo", "no_info")); } ADDMSG(&f->msgs, msg_message("displayitem", "weight item description", @@ -2179,7 +2179,7 @@ display_race(faction *f, unit *u, const race * rc) key = mkname("raceinfo", rc->_name[0]); info = locale_getstring(f->locale, key); - if (info==key || strcmp(info, key)==0) { + if (info==NULL || info==key || strcmp(info, key)==0) { info = locale_string(f->locale, mkname("raceinfo", "no_info")); } diff --git a/src/scripts/eressea/xmas2006.lua b/src/scripts/eressea/xmas2006.lua index 9f9d5195b..2b105790e 100644 --- a/src/scripts/eressea/xmas2006.lua +++ b/src/scripts/eressea/xmas2006.lua @@ -16,7 +16,7 @@ function update_xmas2006() for r in regions() do if r:get_key("xm06") then trees = r:get_resource("tree") - if trees*0.1>1 then + if trees*0.1>=1 then r:set_resource("tree", trees * 1.1) msg:send_region(r) end