Skip to content

Commit

Permalink
Part 2:
Browse files Browse the repository at this point in the history
Fix overzealous BOOL->bool conversion

Structures *must* remain the same size, BOOL was initially cast as a int, and we would read/write values expecting 32bit values, needless to say, this caused issues. The same applies to varaiables that pretend to be a BOOL, and may indeed have been used as a bool, but again, the size is 32bits, not 1 byte.

Revert "fix [s]BOOLs bool by 4B0/\/\1|\|4710|\|" This reverts parts of commit a72c41a

fixes ticket:2556
  • Loading branch information
buginator committed Mar 20, 2011
1 parent 405d032 commit 12e1d13
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 61 deletions.
2 changes: 1 addition & 1 deletion lib/script/event.cpp
Expand Up @@ -984,7 +984,7 @@ void eventFireCallbackTrigger(TRIGGER_TYPE callback)
{
ACTIVE_TRIGGER *psPrev = NULL, *psCurr, *psNext;
TRIGGER_DATA *psTrigDat;
bool fired;
int32_t fired; // was BOOL (int) ** see warning about conversion

if (interpProcessorActive())
{
Expand Down
2 changes: 1 addition & 1 deletion src/game.cpp
Expand Up @@ -1272,7 +1272,7 @@ struct SAVE_GAME_V33 : public SAVE_GAME_V31
NETPLAY sNetPlay;
uint32_t savePlayer;
char sPName[32];
int32_t multiPlayer; // was BOOL which a int
int32_t multiPlayer; // was BOOL (int) ** see warning about conversion
uint32_t sPlayerIndex[MAX_PLAYERS];
};

Expand Down

0 comments on commit 12e1d13

Please sign in to comment.