Fix for: C6297 Result of shift cast to larger size

- Warning: Untested code!