- made D_WriteUserInfoStrings memory safe.
Its callers are anything but for now but this function was the main blocker for refactoring so it had to come first.
This commit is contained in:
parent
783ea20ec8
commit
5a36680a11
4 changed files with 65 additions and 61 deletions
|
|
@ -2621,10 +2621,12 @@ void G_BeginRecording (const char *startmap)
|
|||
{
|
||||
if (playeringame[i])
|
||||
{
|
||||
StartChunk (UINF_ID, &demo_p);
|
||||
WriteByte ((uint8_t)i, &demo_p);
|
||||
D_WriteUserInfoStrings (i, &demo_p);
|
||||
FinishChunk (&demo_p);
|
||||
StartChunk(UINF_ID, &demo_p);
|
||||
WriteByte((uint8_t)i, &demo_p);
|
||||
auto str = D_GetUserInfoStrings(i);
|
||||
memcpy(demo_p, str.GetChars(), str.Len() + 1);
|
||||
demo_p += str.Len();
|
||||
FinishChunk(&demo_p);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue