Browse Source

* converted for-loop to while-loop, because its loop count is used on exit
even if no break is triggered

git-svn-id: trunk@34776 -

Jonas Maebe 8 years ago
parent
commit
1c04470b66
1 changed files with 7 additions and 3 deletions
  1. 7 3
      rtl/unix/timezone.inc

+ 7 - 3
rtl/unix/timezone.inc

@@ -55,9 +55,13 @@ begin
    end
    end
   else
   else
    begin
    begin
-     for i:=1 to num_transitions-1 do
-      if (timer<transitions[i]) then
-       break;
+     i:=1;
+     while i<=num_transitions-1 do
+       begin
+         if (timer<transitions[i]) then
+           break;
+         inc(i);
+       end;
      i:=type_idxs[i-1];
      i:=type_idxs[i-1];
    end;
    end;
   find_transition:=@types[i];
   find_transition:=@types[i];