dinput: Copy device data up to maximum available bytes.

This commit is contained in:
Vitaliy Margolen 2009-01-07 22:43:27 -07:00 committed by Alexandre Julliard
parent 120584d5c5
commit f6f52021f8
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ void fill_DataFormat(void *out, DWORD size, const void *in, const DataFormat *df
memset(out, 0, size); memset(out, 0, size);
if (df->dt == NULL) { if (df->dt == NULL) {
/* This means that the app uses Wine's internal data format */ /* 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 { } else {
for (i = 0; i < df->size; i++) { for (i = 0; i < df->size; i++) {
if (df->dt[i].offset_in >= 0) { if (df->dt[i].offset_in >= 0) {