When actual offset doesn't match the specified offset, use the actual
offset.
This commit is contained in:
parent
3f8d8bec55
commit
3c3a511e8d
|
@ -288,6 +288,7 @@ DataFormat *create_DataFormat(const DIDATAFORMAT *wine_format, LPCDIDATAFORMAT a
|
||||||
int same = 1;
|
int same = 1;
|
||||||
int *done;
|
int *done;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
DWORD next = 0;
|
||||||
|
|
||||||
ret = (DataFormat *) HeapAlloc(GetProcessHeap(), 0, sizeof(DataFormat));
|
ret = (DataFormat *) HeapAlloc(GetProcessHeap(), 0, sizeof(DataFormat));
|
||||||
|
|
||||||
|
@ -341,14 +342,21 @@ DataFormat *create_DataFormat(const DIDATAFORMAT *wine_format, LPCDIDATAFORMAT a
|
||||||
else
|
else
|
||||||
dt[index].size = sizeof(DWORD);
|
dt[index].size = sizeof(DWORD);
|
||||||
dt[index].offset_in = wine_format ->rgodf[i].dwOfs;
|
dt[index].offset_in = wine_format ->rgodf[i].dwOfs;
|
||||||
dt[index].offset_out = asked_format->rgodf[j].dwOfs;
|
if (asked_format->rgodf[j].dwOfs < next) {
|
||||||
|
WARN("bad format: dwOfs=%ld, changing to %ld\n", asked_format->rgodf[j].dwOfs, next);
|
||||||
|
dt[index].offset_out = next;
|
||||||
|
offset[i] = next;
|
||||||
|
} else {
|
||||||
|
dt[index].offset_out = asked_format->rgodf[j].dwOfs;
|
||||||
|
offset[i] = asked_format->rgodf[j].dwOfs;
|
||||||
|
}
|
||||||
dt[index].value = 0;
|
dt[index].value = 0;
|
||||||
index++;
|
next = next + dt[index].size;
|
||||||
|
|
||||||
if (wine_format->rgodf[i].dwOfs != asked_format->rgodf[j].dwOfs)
|
if (wine_format->rgodf[i].dwOfs != dt[index].offset_out)
|
||||||
same = 0;
|
same = 0;
|
||||||
|
|
||||||
offset[i] = asked_format->rgodf[j].dwOfs;
|
index++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue