3 ms·
Pray tell, what is the size of a wchar_t on your system?
by malft 5y ago
Pray tell, what is the size of a wchar_t on your system?
- ploxiln 5y agohah, more than 1 byte for sure, I missed that detail ... EDIT: I develop on unix systems, not windows, so I'm rusty here ... looking up RegQueryValueExW() the `length` ("lpcbData") is in bytes so everything goes fine until `value[length]` which is indexing by wchar_t (16-bit on windows I guess, 32-bit on linux systems) so it's double the byte offset intended, that's way out.