mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-07 15:10:49 +00:00
Fix uninitialized length in X11_GetClipboardData causing test failures (#14322)
This commit is contained in:
parent
ac0915bdb5
commit
093fbfd867
1 changed files with 3 additions and 0 deletions
|
|
@ -273,6 +273,9 @@ bool X11_SetClipboardData(SDL_VideoDevice *_this)
|
|||
void *X11_GetClipboardData(SDL_VideoDevice *_this, const char *mime_type, size_t *length)
|
||||
{
|
||||
SDL_VideoData *videodata = _this->internal;
|
||||
|
||||
*length = 0;
|
||||
|
||||
if (!SDL_HasInternalClipboardData(_this, mime_type)) {
|
||||
// This mime type wasn't advertised by the last selection owner.
|
||||
// The atom might still have data, but it's stale, so ignore it.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue