On 10.03.2017 04:24, Alistair Leslie-Hughes wrote:
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com
dlls/dbghelp/dbghelp_private.h | 3 ++ dlls/dbghelp/symbol.c | 96 ++++++++++++++++++++++++++++++------------ 2 files changed, 73 insertions(+), 26 deletions(-)
Could you give some explanation for the purpose of this patch? It looks a bit odd that we need two almost identical symt_fill_func_line_info implementations.
if (found)
{
char *filename = (char*)source_get(module, dli->u.source_file);
int len = lstrlenA(filename)+1;
line->FileName = fetch_buffer(module->process, len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, filename, -1, line->FileName, len);
[...]
- len = MultiByteToWideChar(CP_ACP, 0, l64->FileName, -1, NULL, 0);
- if ((l64w->FileName = fetch_buffer(pcs, len * sizeof(WCHAR))))
MultiByteToWideChar(CP_ACP, 0, l64->FileName, -1, l64w->FileName, len);
- l64w->Address = l64->Address;
Actually, the old way of converting the strings looked more reasonable. Computing the correct length and checking for errors is preferred in such cases.
Best regards, Sebastian