Starting on a vertex between visplanes causes illegal memory access

Under certain circumstances, if a player start is placed on a vertex between visplanes, Vanilla Doom will crash due to an illegal memory access.

Details
If the player starts on a vertex on a two-sided line, and the sectors on either side can each be rendered as different visplanes (e.g. differing heights or light levels), Vanilla Doom performs an illegal memory access. Depending on the environment, this may throw an exception 0Eh (page fault) in DOS/4GW.

Cause
The cause is reportedly due to a bug in the R_PointToDist function in r_segs.c, but the exact nature has yet to be verified.

Boom 2.02 and MBF fixes this bug.