News for hackers. Stuff that matters.
Re:Cyberpunk 2077 saves will become corrupted if they reach ... by cbarrick on Sunday December 20, 2020 @11:43AM (#25487507)
Isn't `sizeof(bool) == 1` on most C99 compilers?

Having bool be 4 or 8 bytes is ridiculous.

Re:Cyberpunk 2077 saves will become corrupted if they reach ... by aidenn0 on Tuesday December 22, 2020 @01:45PM (#25509677)
Just checked, and you are right. I'm probably thinking of the pre c99 days where a boolean was often implemented as an enum.

(Perhaps unsurprisingly) the literals "true" and "false" appear to be of integer size in the compilers I tried on c99, implying they are implemented as "1" and "0" and not "'\001'" and "'\000'"