- fixed compilation warnings introduced recently

src/console/c_cmds.cpp:690:11: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
src/scripting/vmthunks.cpp:2698:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
This commit is contained in:
alexey.lysiuk 2020-08-29 10:36:29 +03:00
parent eaba63e13b
commit fb20730960
2 changed files with 2 additions and 2 deletions

View File

@ -687,7 +687,7 @@ CCMD(getdate)
{
char timeString[1024];
if (strftime(timeString, sizeof(timeString), "%H:%M:%S %d-%m-%Y%n", timeinfo))
Printf(timeString);
Printf("%s\n", timeString);
else
Printf("Error Retrieving Current Date\n");
}

View File

@ -2695,7 +2695,7 @@ static FString CheckStrfString(FString timeForm)
if (t.Len() == 0) return FString("%");
// Single Character
for (int i = 0; i < sizeof(validSingles)/sizeof(validSingles[0]); i++)
for (size_t i = 0; i < sizeof(validSingles)/sizeof(validSingles[0]); i++)
{
if (t[0] == validSingles[i])
{