fixed off-by-one error in frame buffer converter