]> git.pond.sub.org Git - empserver/commitdiff
Make share_bmap() do nothing for sharing with oneself
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 19 Jan 2011 20:05:44 +0000 (21:05 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Feb 2011 15:41:35 +0000 (16:41 +0100)
Before, it overwrote '?', '.', ' ' in the bmap with the capitalized
country letter, but only for sectors the player owns.  Pretty
harmless, just weird.  It can't happen currently, because sharebmap
with self fails with "does not have friendly relations towards you".

src/lib/subs/maps.c

index 4a8f585bef28461d336275bf761dc8234ca00751..e2c4d890061c2be93765e95eebc825efc7c5ee8d 100644 (file)
@@ -420,6 +420,9 @@ share_bmap(natid from, natid to, struct nstr_sect *ns, char des,
     char todes;
     char from_des = *from_name;
 
+    if (from == to)
+       return 0;
+
     if (isalpha(from_des))
        from_des &= ~0x20;