d3dretrace: Eliminate buffer overflow converting D3DFMT_R5G6B5.