Fixed things I broke for Visual C++ while fixing the source for GCC 4.2.

SVN r431 (trunk)
This commit is contained in:
Randy Heit 2006-12-29 03:48:00 +00:00
parent 851bf89442
commit cbac8db8a5
2 changed files with 8 additions and 6 deletions

View file

@ -150,7 +150,7 @@ int FNodeBuilder::CreateSeg (int linenum, int sidenum)
seg.loopnum = 0; seg.loopnum = 0;
seg.partner = DWORD_MAX; seg.partner = DWORD_MAX;
seg.hashnext = NULL; seg.hashnext = NULL;
seg.planefront = DWORD_MAX; seg.planefront = false;
seg.planenum = DWORD_MAX; seg.planenum = DWORD_MAX;
seg.storedseg = DWORD_MAX; seg.storedseg = DWORD_MAX;

View file

@ -121,9 +121,11 @@ void I_BuildMIDIMenuList (struct value_s **outValues, float *numValues)
if (res == MMSYSERR_NOERROR) if (res == MMSYSERR_NOERROR)
{ {
size_t len = strlen (caps.szPname) + 1; size_t len = strlen (caps.szPname) + 1;
values[p].name = new char[len]; char *name = new char[len];
memcpy (name, caps.szPname, len);
values[p].name = name;
values[p].value = (float)id; values[p].value = (float)id;
memcpy (values[p].name, caps.szPname, len);
++p; ++p;
} }
} }