fix compile warnings about shifting negative numbers

Authored by sandsmark on May 12 2019, 9:20 AM.