From: Jactry Zeng Subject: Re: [PATCH] d3dcompiler: Implement D3DCompileFromFile(). Message-Id: <03c8779d-7608-c681-9ed8-573c26f60cdb@codeweavers.com> Date: Wed, 8 Apr 2020 14:05:44 +0800 In-Reply-To: References: <96700567-fdbd-ad01-8439-05a9365f1ffd@codeweavers.com> On 4/6/20 18:01, Nikolay Sivov wrote: >> + >> +    hr = D3DCompile(source, strlen(source), NULL, defines, includes, entrypoint, target, flags1, flags2, code, errors); > Length passed to D3DCompile() does not look right. Shouldn't you pass source_size there instead? Also mapping the file is probably easier. Yes, this is wrong. I sent another try. Thanks!


On 4/6/20 18:01, Nikolay Sivov wrote:
+
+    hr = D3DCompile(source, strlen(source), NULL, defines, includes, entrypoint, target, flags1, flags2, code, errors);
Length passed to D3DCompile() does not look right. Shouldn't you pass source_size there instead? Also mapping the file is probably easier.

Yes, this is wrong. I sent another try.
Thanks!