(840fc07) invalid map position at grid (0,0,-12)

Windows 7
SDL

I got this message when i pressed shift+v at the bottom of a mine.
Pressing and holding spacebar cycled through coordinate numbers and eventually crashed the game.

Full picture

Save if Needed

Looks like my fault.
I’ll try to fix.

It seems to happen only deep below the ground (-6 and lower), so it’s probably doubling the z coordinate even though it shouldn’t.

Thank You