mirror of
https://github.com/electronicarts/CnC_Remastered_Collection
synced 2024-06-16 09:14:37 +12:00
Fix overflow found by PVS Studio
Was V512 at https://www.viva64.com/en/b/0741/
This commit is contained in:
parent
70076bf624
commit
8d6422e1b2
|
@ -245,7 +245,7 @@ void SoundControlsClass::Process(void)
|
||||||
int length = Theme.Track_Length(index);
|
int length = Theme.Track_Length(index);
|
||||||
char const * fullname = Theme.Full_Name(index);
|
char const * fullname = Theme.Full_Name(index);
|
||||||
|
|
||||||
void * ptr = new char [sizeof(100)];
|
void * ptr = new char [100];
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
sprintf((char *)ptr, "%cTrack %d\t%d:%02d\t%s", index, listbox.Count()+1, length / 60, length % 60, fullname);
|
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);
|
listbox.Add_Item((char const *)ptr);
|
||||||
|
|
Loading…
Reference in a new issue