Fix illegal memory access
Fix illegal memory access

As reported by https://github.com/tbeu/matio/issues/129

MaartenBent/matio,tbeu/matio,MaartenBent/matio,tbeu/matio,tbeu/matio,MaartenBent/matio,MaartenBent/matio,tbeu/matio