From: Mikko Rasa Date: Thu, 11 Jul 2013 11:38:23 +0000 (+0300) Subject: Fix uninitialized variables in Intellibox driver X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=f4b1ac84400a95e1a9fe68ff00bcd52e44911cf2;p=r2c2.git Fix uninitialized variables in Intellibox driver Uninitialized pending_half_step caused wonky loco speed events to be emitted, resulting in out-of-bounds access in speed quantizer. --- diff --git a/source/libr2c2/intellibox.cpp b/source/libr2c2/intellibox.cpp index 73c2057..d4129ec 100644 --- a/source/libr2c2/intellibox.cpp +++ b/source/libr2c2/intellibox.cpp @@ -740,10 +740,12 @@ void Intellibox::error(Command cmd, Error err) Intellibox::Locomotive::Locomotive(): + protocol(NONE), ext_func(false), speed(0), reverse(false), - funcs(0) + funcs(0), + pending_half_step(0) { }