[PATCH] vbscript: Handle NULL code text in ParseScriptText and ParseProcedureText.
Gabriel Ivăncescu
gabrielopcode at gmail.com
Mon Sep 23 08:14:57 CDT 2019
On 9/23/19 4:05 PM, Jacek Caban wrote:
> Hi Gabriel,
>
> On 9/23/19 2:51 PM, Gabriel Ivăncescu wrote:
>> --- a/dlls/vbscript/compile.c
>> +++ b/dlls/vbscript/compile.c
>> @@ -1815,6 +1815,7 @@ static void release_compiler(compile_ctx_t *ctx)
>> HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const
>> WCHAR *delimiter, DWORD flags, vbscode_t **ret)
>> {
>> + static const WCHAR emptyW[] = { 0 };
>> function_t *new_func;
>> function_decl_t *func_decl;
>> class_decl_t *class_decl;
>> @@ -1822,6 +1823,8 @@ HRESULT compile_script(script_ctx_t *script,
>> const WCHAR *src, const WCHAR *deli
>> vbscode_t *code;
>> HRESULT hres;
>> + if (!src) src = emptyW;
>
>
> Please use L"" instead.
>
>
> Thanks,
>
> Jacek
>
Ah, I didn't know that Wine allows the use of Unicode literals now.
More information about the wine-devel
mailing list