Merge pull request #1960 from phire/zfreeze-buffer-underrun Fix a buffer underrun in CalculateZSlope.