Procházet zdrojové kódy

Fix off-by-one error with journey pruning

master
Chris Smith před 14 roky
rodič
revize
198fc7e5c3

+ 1
- 1
code/ContextAnalyser/src/uk/co/md87/android/contextanalyser/ContextAnalyserService.java Zobrazit soubor

@@ -192,7 +192,7 @@ public class ContextAnalyserService extends Service {
192 192
                         // The place was newly added, so for the final N
193 193
                         // elements, the user has been at the place.
194 194
                         
195
-                        for (int i = 0; i < Math.min(LOCATION_REPEATS, activityLog.size()); i++) {
195
+                        for (int i = 0; i < Math.min(LOCATION_REPEATS + 1, activityLog.size()); i++) {
196 196
                             activityLog.remove(activityLog.size() - 1);
197 197
                         }
198 198
                     }

Načítá se…
Zrušit
Uložit