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
|
@ -56,7 +56,8 @@ struct empobj {
|
|||
short uid;
|
||||
coord x; /* is valid if EFF_XY is set in table def. */
|
||||
coord y; /* is valid if EFF_XY is set in table def. */
|
||||
signed char type;
|
||||
signed char type; /* is valid for sectors and units */
|
||||
/* remaining are valid for units */
|
||||
signed char effic;
|
||||
signed char mobil;
|
||||
unsigned char off;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue