diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index eb4001df6e7..0d87ffda914 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -2025,7 +2025,7 @@ static BOOL init_format_base_info(struct wined3d_adapter *adapter) for (i = 0; i < ARRAY_SIZE(typed_formats); ++i) { - const struct wined3d_format *typeless_format; + struct wined3d_format *typeless_format; unsigned int component_count = 0; DWORD flags = 0; @@ -2052,6 +2052,8 @@ static BOOL init_format_base_info(struct wined3d_adapter *adapter) format->block_byte_count = typeless_format->block_byte_count; format->typeless_id = typeless_format->id; + typeless_format->typeless_id = typeless_format->id; + for (j = 0; j < strlen(typed_formats[i].channels); ++j) { enum wined3d_channel_type channel_type = map_channel_type(typed_formats[i].channels[j]);