fix UB in ReadArrayOfIntPtr

closes #86
Merge pull request #89 from rofl0r/fix_readintptr_arr

fix UB in ReadArrayOfIntPtr