Skip to content

A minor fix #1418

@pengfan806

Description

@pengfan806

cTools.pas

function ExpandEnv(const Str: string): string;
var
Res: array[0..High(SmallInt)] of WideChar; // MAX_PATH -> High(SmallInt)
begin
ExpandEnvironmentStringsW(PWideChar(Str), @res, High(SmallInt)); // MAX_PATH -> High(SmallInt)
Result := Res;
end;

When using a long Tools command line, exceeding this range will cause command execution to fail, so you need to specify a larger value. For example, if there is a PyInstaller command line in Tools, MAX_PATH may cause execution to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions