mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-01 23:48:29 +00:00
Added SDL_copyp to avoid size mismatch when copying values (thanks @1bsyl!)
Closes https://github.com/libsdl-org/SDL/pull/5811
This commit is contained in:
@@ -430,7 +430,7 @@ SDL_CreateSemaphore(Uint32 initial_value)
|
||||
#endif
|
||||
|
||||
/* Copy instead of using pointer to save one level of indirection */
|
||||
SDL_memcpy(&SDL_sem_impl_active, impl, sizeof(SDL_sem_impl_active));
|
||||
SDL_copyp(&SDL_sem_impl_active, impl);
|
||||
}
|
||||
return SDL_sem_impl_active.Create(initial_value);
|
||||
}
|
||||
|
Reference in New Issue
Block a user