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:
Sam Lantinga 2022-06-17 10:22:28 -07:00
parent b0e827fb65
commit adc6875870
18 changed files with 49 additions and 44 deletions

View file

@ -431,7 +431,7 @@ SDL_Fcitx_UpdateTextRect(SDL_Rect *rect)
SDL_Rect *cursor = &fcitx_client.cursor_rect;
if (rect) {
SDL_memcpy(cursor, rect, sizeof(SDL_Rect));
SDL_copyp(cursor, rect);
}
focused_win = SDL_GetKeyboardFocus();