pos[2] larger than 65535 is clamped to 65535 and not 0
Merge pull request #739 from raven02/patch-1

pos[2] larger than 65535 is clamped to 65535 and not 0