]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/progress.cc
* apt-pkg/aptconfiguration.cc:
[apt.git] / apt-pkg / contrib / progress.cc
index ffd1191e52c4e608950d2c84f20b46fd49909eac..cffdddc4fe0d70a9f45e3fc5fadd3c73c7944168 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <iostream>
 #include <stdio.h>
+#include <cstring>
                                                                        /*}}}*/
 
 using namespace std;
@@ -112,6 +113,8 @@ bool OpProgress::CheckChange(float Interval)
    
    if ((int)LastPercent == (int)Percent)
       return false;
+
+   LastPercent = Percent;
    
    if (Interval == 0)
       return false;
@@ -123,7 +126,6 @@ bool OpProgress::CheckChange(float Interval)
    if (Diff < Interval)
       return false;
    LastTime = Now;   
-   LastPercent = Percent;
    return true;
 }
                                                                        /*}}}*/