[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rockbox-cvs
Subject:    qeditor: fix horrible out of bound bug
From:       gerrit () rockbox ! org
Date:       2014-09-19 8:58:08
Message-ID: 201409190858.s8J8w8Y1000431 () giant ! haxx ! se
[Download RAW message or body]

commit 79c5a07b4d067c00fa5ad4decf1d269bae2cb72f
Author: Amaury Pouly <amaury.pouly@gmail.com>
Date:   Thu Sep 18 19:04:05 2014 +0200

    qeditor: fix horrible out of bound bug
    
    Change-Id: I1b34b1cd7be83d90e38559e386d0c6c64797b707
    Reviewed-on: http://gerrit.rockbox.org/977
    Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>

diff --git a/utils/regtools/qeditor/std_analysers.cpp b/utils/regtools/qeditor/std_analysers.cpp
index 5847e39..f278c2a 100644
--- a/utils/regtools/qeditor/std_analysers.cpp
+++ b/utils/regtools/qeditor/std_analysers.cpp
@@ -468,7 +468,7 @@ void EmiAnalyser::FillTable()
         ports.erase(ports.begin() + value / 6);
         int ord[6][3] = { {0, 1, 2}, {2, 0, 1}, {1, 2, 0}, {2, 1, 0}, {1, 0, 2}, {0, 2, 1} };
         for(int i = 0; i < 3; i++)
-            order += ", " + ports[ord[value][i]];
+            order += ", " + ports[ord[value % 6][i]];
         AddLine("Port Priority Order", value, "", order);
     }
 
_______________________________________________
rockbox-cvs mailing list
rockbox-cvs@cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic