I didn’t know. just saw it in my debug window a BOOLEAN from STORAGE_DEVICE_DESCRIPTOR was resolving to 2 instead of of 1. I got panicked thinking 2 means false. then I realized its 1 for true. But why this kind of odd design ? Or I am doing something wrong in my side ? never heard of anything like multibyte boolean. (BTW I am using MinGW and Qt Creator IDE’s Debugger)
I didn’t know. just saw it in my debug window a BOOLEAN from STORAGE_DEVICE_DESCRIPTOR
Share
There are historical reasons for why many types of boolean exist which is discussed here. Essentially any non-zero values are true, and zero is false. This means you shouldn’t do comparisons like so:
But instead: