aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrij D. Czarkoff <czarkoff@gmail.com>2016-04-28 18:10:48 +0200
committerDmitrij D. Czarkoff <czarkoff@gmail.com>2016-04-29 16:31:49 +0200
commit30db614d328952ea3baf547c5a5d71b6661aba92 (patch)
tree99d5e6f9a1249b602e5af752859fc998fc4e42d4
parentff5029b867ebf550126ba63aa5872b906c2e6441 (diff)
downloadimv-30db614d328952ea3baf547c5a5d71b6661aba92.tar.gz
Fix uninitialized use of "last_time"
Set "last_time" to current time at declaration time, so that it holds at least something by the time it is used.
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index a24161b..44cedcf 100644
--- a/src/main.c
+++ b/src/main.c
@@ -313,7 +313,7 @@ int main(int argc, char** argv)
}
/* help keeping track of time */
- unsigned int last_time;
+ unsigned int last_time = SDL_GetTicks();
unsigned int current_time;
/* keep file change polling rate under control */