]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winplink.c
Fix uninitialised variable in two Windows event loops.
[PuTTY.git] / windows / winplink.c
index 1c4f3307cd50be20bb8ca06b93b8c8ae75daa3f9..43826622b4a0e64e4e6d2ef9a29867b253c8305d 100644 (file)
@@ -661,6 +661,7 @@ int main(int argc, char **argv)
 
         if (toplevel_callback_pending()) {
             ticks = 0;
+            next = now;
         } else if (run_timers(now, &next)) {
            then = now;
            now = GETTICKCOUNT();
@@ -670,6 +671,8 @@ int main(int argc, char **argv)
                ticks = next - now;
        } else {
            ticks = INFINITE;
+            /* no need to initialise next here because we can never
+             * get WAIT_TIMEOUT */
        }
 
        handles = handle_get_events(&nhandles);