[gnome-games] Changed the range of lines from (1..20) to (0..19)



commit fed9a37e62e7f69f8e410cb7f78126ee84c7ee22
Author: Craig Duncan <git duncanc co uk>
Date:   Thu Jul 29 23:16:46 2010 +0100

    Changed the range of lines from (1..20) to (0..19)
    
    The code to move lines down after an explode was looping around an incorrect range of lines.
    It was checking line 20, which I don't believe exists.
    But more importantly it wasn't checking row 0, which is the top row.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=608341

 quadrapassel/blockops.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/quadrapassel/blockops.cpp b/quadrapassel/blockops.cpp
index b8c0b8d..411be19 100644
--- a/quadrapassel/blockops.cpp
+++ b/quadrapassel/blockops.cpp
@@ -363,7 +363,7 @@ BlockOps::checkFullLines()
 	clutter_behaviour_remove_all (explode_fade_behaviour);
 	clutter_behaviour_remove_all (explode_scale_behaviour);
 
-	for (int y = MIN (posy + 4, LINES); y > 0; --y)
+	for (int y = MIN (posy + 4, LINES - 1); y >= 0; --y)
 	{
 		if (checkFullLine (y))
 		{



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]