[PATCH] wined3d: Increase string buffer size in wined3d_debug_resource_access().
Otherwise it was crashing on long resource access debug string. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> --- dlls/wined3d/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 10cfa25a4c..e2c02f0785 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -4150,7 +4150,7 @@ const char *debug_d3ddevicetype(enum wined3d_device_type device_type) const char *wined3d_debug_resource_access(DWORD access) { - char buf[91]; + char buf[126]; buf[0] = '\0'; #define ACCESS_TO_STR(x) if (access & x) { strcat(buf, " | "#x); access &= ~x; } -- 2.14.3
2018-02-21 11:50 GMT+01:00 Paul Gofman <gofmanp(a)gmail.com>:
Otherwise it was crashing on long resource access debug string.
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com>
Hi Paul, it looks like Józef was faster than both me and you: https://source.winehq.org/patches/data/142047 :)
On 02/21/2018 02:44 PM, Matteo Bruni wrote:
2018-02-21 11:50 GMT+01:00 Paul Gofman <gofmanp(a)gmail.com>:
Otherwise it was crashing on long resource access debug string.
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Hi Paul,
it looks like Józef was faster than both me and you: https://source.winehq.org/patches/data/142047 :)
Oh sry, didn't notice that. But is 124 a correct length? I am getting 125 somehow: 3*4 (for " | ") + 27 * 2 + 29 * 2 + 1 (trailing zero), while 126 I put there is probably an overshoot.
On 21 February 2018 at 15:45, Paul Gofman <gofmanp(a)gmail.com> wrote:
Oh sry, didn't notice that. But is 124 a correct length? I am getting 125 somehow: 3*4 (for " | ") + 27 * 2 + 29 * 2 + 1 (trailing zero), while 126 I put there is probably an overshoot.
I think you may be right.
participants (3)
-
Henri Verbeet -
Matteo Bruni -
Paul Gofman