mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-14 13:56:00 +00:00
Set size parameter in SDL_GetClipboardData()
Update size value in case where platform uses GetClipboardText(). This should fix clipboard_testClipboardDataFunctions on those platforms.
This commit is contained in:
@@ -196,9 +196,13 @@ void *SDL_GetClipboardData(const char *mime_type, size_t *size)
|
||||
return _this->GetClipboardData(_this, mime_type, size);
|
||||
} else if (_this->GetClipboardText && SDL_IsTextMimeType(mime_type)) {
|
||||
char *text = _this->GetClipboardText(_this);
|
||||
if (text && *text == '\0') {
|
||||
if (text) {
|
||||
if (*text == '\0') {
|
||||
SDL_free(text);
|
||||
text = NULL;
|
||||
} else {
|
||||
*size = SDL_strlen(text);
|
||||
}
|
||||
}
|
||||
return text;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user