forked from github/server
strcmp() bugfixes
This commit is contained in:
parent
6283910959
commit
72d0596bec
|
@ -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"));
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue