fixed a potential division by 0 in the cli trace unit
diff --git a/programs/zstdcli_trace.c b/programs/zstdcli_trace.c
index 35075a5..f73071a 100644
--- a/programs/zstdcli_trace.c
+++ b/programs/zstdcli_trace.c
@@ -81,8 +81,9 @@
 {
     int level = 0;
     int workers = 0;
+    double const durationAsDouble = duration ? (double)duration : .1;
     double const ratio = (double)trace->uncompressedSize / (double)trace->compressedSize;
-    double const speed = ((double)trace->uncompressedSize * 1000) / (double)duration;
+    double const speed = ((double)trace->uncompressedSize * 1000) / durationAsDouble;
     if (trace->params) {
         ZSTD_CCtxParams_getParameter(trace->params, ZSTD_c_compressionLevel, &level);
         ZSTD_CCtxParams_getParameter(trace->params, ZSTD_c_nbWorkers, &workers);