Truncate DCP/content speed percentages.
authorCarl Hetherington <cth@carlh.net>
Fri, 7 Dec 2018 21:47:58 +0000 (21:47 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 7 Dec 2018 21:47:58 +0000 (21:47 +0000)
src/lib/frame_rate_change.cc

index e16aad072473edc2205d40d98ad77f2421093d97..8ad6de9425aa2675158ed5b7a3421658e4c0aedf 100644 (file)
@@ -110,7 +110,9 @@ FrameRateChange::description () const
 
                if (change_speed) {
                        double const pc = dcp * 100 / (source * factor());
-                       description += String::compose (_("DCP will run at %1%% of the content speed.\n"), pc);
+                       char buffer[256];
+                       snprintf (buffer, sizeof(buffer), _("DCP will run at %.1f%% of the content speed.\n"), pc);
+                       description += buffer;
                }
        }