Make sector types signed
get_empobj_chr() and emp_obj_chr_name() access struct sctstr member sct_type through struct empobj member type. This is technically non-portable, because the two differ in signedness. It was also undocumented. Fix by making sct_type signed. sct_newtype as well, for consistency. map_char() uses unsigned char for a sector type argument. Change that to int. Matches how this is done elsewhere.
This commit is contained in:
parent
f8a35dda1e
commit
fc807a4c0a
4 changed files with 8 additions and 7 deletions
|
@ -108,7 +108,7 @@ struct castr sect_ca[] = {
|
|||
{NSC_SHORT, NSC_DEITY, 0, fldoff(sctstr, sct_elev), "elev", EF_BAD},
|
||||
{NSC_XCOORD, NSC_CONST, 0, fldoff(sctstr, sct_x), "xloc", EF_BAD},
|
||||
{NSC_YCOORD, NSC_CONST, 0, fldoff(sctstr, sct_y), "yloc", EF_BAD},
|
||||
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_type), "des", EF_SECTOR_CHR},
|
||||
{NSC_CHAR, 0, 0, fldoff(sctstr, sct_type), "des", EF_SECTOR_CHR},
|
||||
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_effic), "effic", EF_BAD},
|
||||
{NSC_SHORT, 0, 0, fldoff(sctstr, sct_mobil), "mobil", EF_BAD},
|
||||
{NSC_UCHAR, NSC_DEITY, 0, fldoff(sctstr, sct_loyal), "loyal", EF_BAD},
|
||||
|
@ -123,7 +123,7 @@ struct castr sect_ca[] = {
|
|||
{NSC_SHORT, 0, 0, fldoff(sctstr, sct_avail), "avail", EF_BAD},
|
||||
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_work), "work", EF_BAD},
|
||||
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_coastal), "coastal", EF_BAD},
|
||||
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_newtype), "newdes", EF_SECTOR_CHR},
|
||||
{NSC_CHAR, 0, 0, fldoff(sctstr, sct_newtype), "newdes", EF_SECTOR_CHR},
|
||||
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_min), "min", EF_BAD},
|
||||
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_gmin), "gold", EF_BAD},
|
||||
{NSC_UCHAR, 0, 0, fldoff(sctstr, sct_fertil), "fert", EF_BAD},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue