Safety memset when creating error information for a new thread.
This commit is contained in:
parent
54e9fbfea5
commit
3be0550a6c
1
physfs.c
1
physfs.c
|
@ -138,6 +138,7 @@ void __PHYSFS_setError(const char *str)
|
||||||
if (err == NULL)
|
if (err == NULL)
|
||||||
return; /* uhh...? */
|
return; /* uhh...? */
|
||||||
|
|
||||||
|
memset((void *) err, '\0', sizeof (ErrMsg));
|
||||||
err->tid = __PHYSFS_platformGetThreadID();
|
err->tid = __PHYSFS_platformGetThreadID();
|
||||||
err->next = errorMessages;
|
err->next = errorMessages;
|
||||||
errorMessages = err;
|
errorMessages = err;
|
||||||
|
|
Loading…
Reference in New Issue