Changed type between sizeof and casting - intentional?