Merge pull request #65 from floitschG/avoid_undef_cast

Avoid undefined cast to make ASAN happy.