changeset 3834:52109c4bc5de

Prevent AIOOB exception. flys-client/trunk@5540 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 20 Sep 2012 09:58:10 +0000
parents 611cb0f1761e
children 11d74b9d428a
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Sep 20 09:34:05 2012 +0000
+++ b/flys-client/ChangeLog	Thu Sep 20 09:58:10 2012 +0000
@@ -1,3 +1,8 @@
+2012-09-19	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java:
+	  Prevent AIOOB exception.
+
 2012-09-19	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java	Thu Sep 20 09:34:05 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/GaugePanel.java	Thu Sep 20 09:58:10 2012 +0000
@@ -164,7 +164,7 @@
                     }
                 }
                 else {
-                    for (int i = gauges.size(); i >= 0; i--) {
+                    for (int i = gauges.size()-1; i >= 0; i--) {
                         GaugeInfo gauge = gauges.get(i);
                         addGauge(gauge, emptygauges);
                     }

http://dive4elements.wald.intevation.org