X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Modules%2FDisplay%2FVESA%2Fmain.c;h=425533bdb280ae434d9723ab1c5b38fcc4f68640;hb=ea71e58b0c3eca3744824fbd7e282ce47abfe334;hp=bafab9d10d091961b3d4e2d640e56fad4c8660d5;hpb=cb8ee714fcb4fce504fd767462789093a9fecbb1;p=tpg%2Facess2.git diff --git a/Modules/Display/VESA/main.c b/Modules/Display/VESA/main.c index bafab9d1..425533bd 100644 --- a/Modules/Display/VESA/main.c +++ b/Modules/Display/VESA/main.c @@ -516,9 +516,9 @@ void Vesa_FlipCursor(void *Arg) //Debug("Cursor flip"); - // Sanity 1 + // Sanity check if(giVesaCursorX < 0 || giVesaCursorY < 0 - || y*pitch + x + giVT_CharHeight*pitch > (int)gpVesaCurMode->fbSize/4) { + || y*pitch + x + (giVT_CharHeight-1)*pitch > (int)gpVesaCurMode->fbSize/4) { Log_Notice("VESA", "Cursor OOB (%i,%i)", x, y); giVesaCursorTimer = -1; return;