From f6f52021f844664e2b10d97d9f3068956ed4db05 Mon Sep 17 00:00:00 2001 From: Vitaliy Margolen Date: Wed, 7 Jan 2009 22:43:27 -0700 Subject: [PATCH] dinput: Copy device data up to maximum available bytes. --- dlls/dinput/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 91449f8f846..8e226cc2d3e 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -274,7 +274,7 @@ void fill_DataFormat(void *out, DWORD size, const void *in, const DataFormat *df memset(out, 0, size); if (df->dt == NULL) { /* This means that the app uses Wine's internal data format */ - memcpy(out, in, df->internal_format_size); + memcpy(out, in, min(size, df->internal_format_size)); } else { for (i = 0; i < df->size; i++) { if (df->dt[i].offset_in >= 0) { -- 2.11.4.GIT