From 6b4d3fd57ca170b8651abe8cadb01820fb923192 Mon Sep 17 00:00:00 2001 From: jcdr428 Date: Fri, 10 Jun 2022 13:56:16 +0100 Subject: [PATCH] [bug] Fix negative duration --- libmediation/types/types.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmediation/types/types.cpp b/libmediation/types/types.cpp index 1895504..74a752c 100644 --- a/libmediation/types/types.cpp +++ b/libmediation/types/types.cpp @@ -209,7 +209,7 @@ uint64_t roundUp64(const uint64_t& value, const uint64_t& roundVal) string strPadLeft(const string& str, size_t newSize, char filler) { - size_t cnt = newSize - str.size(); + int cnt = (int)(newSize - str.size()); string prefix = ""; for (int i = 0; i < cnt; i++) prefix += filler; return prefix + str; @@ -217,7 +217,7 @@ string strPadLeft(const string& str, size_t newSize, char filler) string strPadRight(const string& str, size_t newSize, char filler) { - size_t cnt = newSize - str.size(); + int cnt = (int)(newSize - str.size()); string postfix = ""; for (int i = 0; i < cnt; i++) postfix += filler; return str + postfix;