Unless you truncated the file by hand, which is unlikely (you would know if you did), this can actually only happen if Code::Blocks crashes at shutdown, when the config file is overwritten. That's a scary thought, as that's not something that could conceivably happen (not in a way that could corrupt something, anyway). Unless it's some thread from some plugin (code completion parser?) that's crashing the app...
The save path under Windows 8 should be very similar to the one in Windows 7, give or take a "/Roaming/" (assuming you don't use that cloud store stuff).
If you don't find another config that you can copy, you should just delete that file, it will restore default settings, which is admittedly annoying but at least Code::Blocks will work again.