Skip to content

Commit

Permalink
Use malloc instead of alloca for arguments as we are in a nested …
Browse files Browse the repository at this point in the history
…function.
  • Loading branch information
denis-sh committed Nov 20, 2012
1 parent f52cb5c commit f4cbdf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/dmain2.d
Expand Up @@ -165,7 +165,7 @@ extern (C) int _d_run_main(size_t argc, char **argv, void *p)
char* cargp = null;
size_t cargl = WideCharToMultiByte(65001, 0, wcbuf, cast(int)wclen, null, 0, null, null);

cargp = cast(char*) alloca(cargl);
cargp = cast(char*) malloc(cargl);

for (size_t i = 0, p = 0; i < wargc; i++)
{
Expand Down

0 comments on commit f4cbdf0

Please sign in to comment.