silence signed overflow warning
authorLars Op den Kamp <lars@opdenkamp.eu>
Sun, 7 Oct 2012 22:13:48 +0000 (00:13 +0200)
committerLars Op den Kamp <lars@opdenkamp.eu>
Sun, 7 Oct 2012 22:13:48 +0000 (00:13 +0200)
src/lib/CECClient.cpp

index cafcd700d0ab8c40a484477d22721b25da3da878..ed3f47eecc23e04976bd3ed560184f3ea8155908 100644 (file)
@@ -1076,7 +1076,7 @@ std::string CCECClient::GetConnectionInfo(void)
   {
     time_t buildTime = (time_t)m_configuration.iFirmwareBuildDate;
     strLog.AppendFormat(", firmware build date: %s", asctime(gmtime(&buildTime)));
-    strLog = strLog.Left((int)strLog.length() - 1); // strip \n added by asctime
+    strLog = strLog.substr(0, strLog.length() > 0 ? (size_t)(strLog.length() - 1) : 0); // strip \n added by asctime
     strLog.append(" +0000");
   }