Fix undefined behavior in Immersion vibrator code