From: Joerg Rueppel <sharky-x@gmx.net> Co-authored-by: Matteo Bruni <matteo.mystral@gmail.com> --- dlls/d3dxof/parsing.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/d3dxof/parsing.c b/dlls/d3dxof/parsing.c index 92df0427367..9336194af84 100644 --- a/dlls/d3dxof/parsing.c +++ b/dlls/d3dxof/parsing.c @@ -1364,10 +1364,11 @@ BOOL parse_object(parse_buffer * buf) buf->pxo->root = buf->pxo_tab; - /* Insert padding for case where the returned object gets reinterpreted as - * Delphi dynamic array, which will write to ptr-4 for refcounting and - * will use the preexisting value for allocation decisions. Must be >= 2. - */ + /* Applications have been known to depend on the presence of padding before + * the object data. + * Specifically, Space Empires V reinterprets the returned object as a + * Delphi dynamic array and updates the value at (DWORD *)ptr - 1 for + * refcounting and allocation decisions. Must be >= 2. */ if (!check_buffer(buf, 4)) return FALSE; *(DWORD *)(buf->pdata + buf->cur_pos_data) = 2; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10278