Wip fixstriperoni386

This fixes both the coverity defects that can be fixed and the build errors on 32 bits.