clamp shit so vhs effect doesent do oob writes on some resolutions

shoddy way but fuckit
This commit is contained in:
Alug committed 2025-06-04 20:43:48 +02:00
1 parent 5a37a8c4db
commit 7808ef5bf3
1 file changed
+1 -1
+1 -1
View File
@@ -1666,7 +1666,7 @@ void V_DrawVhsEffect(boolean rewind)
if (y == 0 && offs < 0) offs = 0;
else if (y >= vid.height-2 && offs > 0) offs = 0;
for (x = pos+vid.rowbytes*2; pos < x; pos++)
for (x = min(pos+vid.rowbytes*2, vid.rowbytes*vid.height); pos < x; pos++)
{
tmp[pos] = thismapstart[buf[pos+offs]];
#ifdef HQ_VHS