From 9739fd417cabb314abd544a413e532046ae7b8c7 Mon Sep 17 00:00:00 2001 From: Kyzentun Keeslala Date: Wed, 18 Nov 2015 20:07:49 -0700 Subject: [PATCH] Cast GetUnit to unsigned int in SpeedSegment::ToString to avoid crashing in ssprintf. --- src/TimingSegments.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TimingSegments.cpp b/src/TimingSegments.cpp index ac9d6a2ada..edb1dc4eaf 100644 --- a/src/TimingSegments.cpp +++ b/src/TimingSegments.cpp @@ -211,7 +211,7 @@ RString SpeedSegment::ToString(int dec) const + "f=%.0" + IntToString(dec) + "f=%.0" + IntToString(dec) + "f=%u"; return ssprintf(str.c_str(), GetBeat(), GetRatio(), - GetDelay(), GetUnit()); + GetDelay(), static_cast(GetUnit())); } vector SpeedSegment::GetValues() const