diff --git a/src/undo.h b/src/undo.h
--- a/src/undo.h
+++ b/src/undo.h
@@ -59,7 +59,7 @@
             // Old versions stored the version number for the last spend of a
             // transaction's outputs. Non-final spends were indicated with
             // height = 0.
-            unsigned int nVersionDummy;
+            unsigned int nVersionDummy = 0;
             ::Unserialize(s, VARINT(nVersionDummy));
         }