[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: [v2 PATCH] d3dx9_36: Stop crash when displaying effect errors
From: Matteo Bruni <matteo.mystral () gmail ! com>
Date: 2016-06-28 16:58:50
Message-ID: CABvNrtPfO3VenJeb+x50+DE_zePNK+7YWYdbYzMfJKJAZHWjCQ () mail ! gmail ! com
[Download RAW message or body]
2016-06-22 13:10 GMT+02:00 Alistair Leslie-Hughes <leslie_alistair@hotmail.com>:
> if (temp_errors)
> - TRACE("%s\n", (char *)ID3D10Blob_GetBufferPointer(temp_errors));
> + {
> + const char *p = ID3D10Blob_GetBufferPointer(temp_errors);
> + SIZE_T size = ID3D10Blob_GetBufferSize(temp_errors);
> + const char *end = p + size;
> + const char *line = p;
> +
> + while (p != end)
> + {
> + if (*p == '\n')
> + {
> + UINT len = p - line;
> + if (len && *(p - 1) == '\r') --len;
> + TRACE("%s\n", debugstr_an(line, len));
> + line = ++p;
> + }
> + else ++p;
> + }
> + if (line != p)
> + TRACE("%s\n", debugstr_an(line, p - line));
> + }
This only breaks at '\n', which might still be too much if the lines
are particularly long.
I also wrote a patch for this a few days ago. I'm going to send it to
wine-patches in a bit, I'd appreciate if you can test if it works for
you or point out any issue with it.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic