cppcheck fixes for Qt TAS editor.

This commit is contained in:
mjbudd77 2021-11-27 10:26:52 -05:00
parent da993c51a2
commit 82f76e3434
2 changed files with 4 additions and 3 deletions

View File

@ -796,7 +796,7 @@ void SPLICER::redrawInfoAboutClipboard(void)
// rows // rows
if (clipboardSelection.size() > 1) if (clipboardSelection.size() > 1)
{ {
//_itoa(clipboardSelection.size(), num, 10); sprintf( num, "%zi", clipboardSelection.size());
strcat(new_text, num); strcat(new_text, num);
strcat(new_text, numTextRows); strcat(new_text, numTextRows);
} }
@ -811,7 +811,8 @@ void SPLICER::redrawInfoAboutClipboard(void)
sprintf( num, "%i", columns); sprintf( num, "%i", columns);
strcat(new_text, num); strcat(new_text, num);
strcat(new_text, numTextColumns); strcat(new_text, numTextColumns);
} else }
else
{ {
strcat(new_text, numTextColumn); strcat(new_text, numTextColumn);
} }

View File

@ -245,7 +245,7 @@ bool TASEDITOR_PROJECT::load(const char* fullName)
strcpy(message, "This project was saved using different version of TAS Editor!\n\n"); strcpy(message, "This project was saved using different version of TAS Editor!\n\n");
strcat(message, "Original version: "); strcat(message, "Original version: ");
char versionNum[16]; char versionNum[16];
sprintf( versionNum, "%i", projectFileVersion); sprintf( versionNum, "%u", projectFileVersion);
strncat(message, versionNum, 2047 - strlen(message)); strncat(message, versionNum, 2047 - strlen(message));
strncat(message, "\nCurrent version: ", 2047 - strlen(message)); strncat(message, "\nCurrent version: ", 2047 - strlen(message));
sprintf( versionNum, "%i", PROJECT_FILE_CURRENT_VERSION); sprintf( versionNum, "%i", PROJECT_FILE_CURRENT_VERSION);