wayland: null-terminate drop data

This commit is contained in:
Guldoman 2022-10-09 06:15:18 +02:00 committed by Sam Lantinga
parent 9df1af352f
commit b91ddbc3e2
1 changed files with 1 additions and 1 deletions

View File

@ -1683,7 +1683,7 @@ data_device_handle_drop(void *data, struct wl_data_device *wl_data_device)
/* TODO: SDL Support more mime types */
size_t length;
void *buffer = Wayland_data_offer_receive(data_device->drag_offer,
&length, FILE_MIME, SDL_FALSE);
&length, FILE_MIME, SDL_TRUE);
if (buffer) {
char *saveptr = NULL;
char *token = SDL_strtokr((char *) buffer, "\r\n", &saveptr);