Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Fixed minor problems found by PVS Studio #81

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion REDALERT/CONQUER.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -5573,7 +5573,7 @@ void Shake_The_Screen(int shakes, HousesType house)
*=============================================================================================*/
void List_Copy(short const * source, int len, short * dest)
{
if (dest == NULL || dest == NULL) {
if (source == NULL || dest == NULL) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion TIBERIANDAWN/SOUNDDLG.CPP
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ void SoundControlsClass::Process(void)
int length = Theme.Track_Length(index);
char const * fullname = Theme.Full_Name(index);

void * ptr = new char [sizeof(100)];
void * ptr = new char [100];
if (ptr) {
sprintf((char *)ptr, "%cTrack %d\t%d:%02d\t%s", index, listbox.Count()+1, length / 60, length % 60, fullname);
listbox.Add_Item((char const *)ptr);
Expand Down