Message Board
Register

Re: Finally fixed

Posted by frankenstein on .
Interesting, would "0e468022" === "0e284728" (triple equals) not work?

In reply to: Finally fixed posted by Vimm on .
Think I finally have it solved.

Every game has a unique hash. Full Spectrum Warrior is 0e468022 while Global Defence Force Tactics is 0e284728. No problems there (0e468022 != 0e284728), yet somehow the nightly scan sees both games as one.

I did some digging and oddly the statement ("0e468022" == "0e284728") is TRUE in PHP! Why? Seems a string in the format "0eX" (where X is any string of numbers) translates to (0 * 10x). Multiplying any number by zero is always zero, so (0 * 10468022) is zero, and (0 * 10284728) is also zero.

Using the strcmp() function to compare them fixed it. The scan now sees Global Defence Force Tactics as a different game and properly created a new record.


Replies:
Re: Finally fixed
Vimm -- 1/17/2023 5:23 pm UTC
Re: Finally fixed
frankenstein -- 1/17/2023 5:32 pm UTC
Re: Finally fixed
And BR -- 3/3/2023 2:11 am UTC