mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 07:20:50 +00:00
[sys] Override strdup for 32-bit windows
This fixes some nasty segfaults when calling free due to different allocators being used.
This commit is contained in:
parent
296c04c8eb
commit
939a73fb52
1 changed files with 9 additions and 0 deletions
|
@ -677,6 +677,15 @@ realloc (void *mem, size_t size)
|
|||
{
|
||||
return _aligned_realloc (mem, size, 16);
|
||||
}
|
||||
|
||||
char *__cdecl
|
||||
strdup(const char *src)
|
||||
{
|
||||
size_t len = strlen (src);
|
||||
char *dup = malloc (len + 1);
|
||||
strcpy (dup, src);
|
||||
return dup;
|
||||
}
|
||||
#endif
|
||||
|
||||
VISIBLE size_t
|
||||
|
|
Loading…
Reference in a new issue