Something I noticed two months ago but forgot about.
Here's what is on SVN:
(acroom.h)
#ifdef THIS_IS_THE_ENGINE
if ((rstruc->wasversion < 17) | (rstruc->wasversion > ROOM_FILE_VERSION))
#else
if ((rstruc->wasversion < 15) || (rstruc->wasversion > ROOM_FILE_VERSION))
#endif
{
fclose(opty);
quit("Load_Room: Bad packed file. Either the file requires a newer or older version of\n"
"this program or the file is corrupt.\n");
}
Do you see a different operator here? Engine branch is using '|' (bitwise OR), Editor branch is using '||' (logical OR).
Is it a typo (hence a bug)? And which one is?
My guess is for '||', but... maybe there's some witty plan behind this.
Both ORs are with boolean values, so the ORed values are only 0 or 1. So it doesn't matter if a bitwise or a boolean OR operator is used, it has the same result.
E: || should be used, the other option is confusing.
Quote from: JJS on Fri 20/07/2012 15:23:27
Both ORs are with boolean values, so the ORed values are only 0 or 1. So it doesn't matter if a bitwise or a boolean OR operator is used, it has the same result.
Ahhh.... :D cannot think properly at the Friday's evening.