From 5ea232310ffdd53008f2d0ad0b69962c8bf0f1ad Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 16 Feb 2017 18:55:58 -0500 Subject: [PATCH] Added a check against negative runs. --- Machines/Atari2600/TIA.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Machines/Atari2600/TIA.cpp b/Machines/Atari2600/TIA.cpp index a64915bf0..2915640f3 100644 --- a/Machines/Atari2600/TIA.cpp +++ b/Machines/Atari2600/TIA.cpp @@ -720,6 +720,7 @@ void TIA::draw_player(Player &player, CollisionType collision_identity, const in int first_pixel = first_pixel_cycle - 4 + (horizontal_blank_extend_ ? 8 : 0); if(end < first_pixel) return; if(start < first_pixel) start = first_pixel; + if(start >= end) return; // perform the visible part of the line, if any if(start < 224)