(nat_ca, cou_ca, ef_init_srv, xdvisible): Plug major information leak:
nat_ca[] was designed for visibility to the owner only, while cou_ca[] was designed for the public. xdvisible() implemented that for xdump. But selectors don't care for that! Since nat_ca[] applies to EF_NATION, it must be for public visibility. Broken in 4.2.21. Fix by exchanging contents of nat_ca[] and and cou_ca[]. This breaks clients relying on xdump.
This commit is contained in:
parent
548bc5bbdc
commit
93b6a54356
3 changed files with 11 additions and 11 deletions
|
@ -485,14 +485,14 @@ struct castr trade_ca[] = {
|
|||
{NSC_NOTYPE, 0, 0, 0, NULL, EF_BAD}
|
||||
};
|
||||
|
||||
struct castr nat_ca[] = {
|
||||
struct castr cou_ca[] = {
|
||||
/*
|
||||
* This is the owner's view, i.e. it applies only to the own
|
||||
* nation. The public view cou_ca[], which applies to all
|
||||
* nation. The public view nat_ca[], which applies to all
|
||||
* nations, has the same selectors with different flags: NSC_DEITY
|
||||
* is set except for cnum (which must come first) and all
|
||||
* NSC_EXTRA selectors, NSC_EXTRA is cleared.
|
||||
* cou_ca[] should also make tech, research, education and
|
||||
* nat_ca[] should also make tech, research, education and
|
||||
* happiness available, but we can't express the obfuscation
|
||||
* necessary for foreign levels.
|
||||
*/
|
||||
|
@ -543,7 +543,7 @@ struct castr nat_ca[] = {
|
|||
{NSC_NOTYPE, 0, 0, 0, NULL, EF_BAD}
|
||||
};
|
||||
|
||||
struct castr cou_ca[sizeof(nat_ca) / sizeof(*nat_ca)];
|
||||
struct castr nat_ca[sizeof(cou_ca) / sizeof(*cou_ca)];
|
||||
/* initialized in ef_init_srv() */
|
||||
|
||||
struct castr realm_ca[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue