diff options
author | Dan Gudmundsson <dgud@erlang.org> | 2023-05-08 15:56:15 +0200 |
---|---|---|
committer | Dan Gudmundsson <dgud@erlang.org> | 2023-05-08 15:56:15 +0200 |
commit | 421818f33356ba6988712c50564b86458d15a7ec (patch) | |
tree | c628dc6b8e0859f6360805d5840087a5272fb1f3 | |
parent | 6272f6bde079e65876627cb569026f2014049fd5 (diff) | |
download | erlang-421818f33356ba6988712c50564b86458d15a7ec.tar.gz |
erlc: Fix compiler server args on windows
String could be wrong length if arg was quoted and changed.
-rw-r--r-- | erts/etc/common/erlc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/etc/common/erlc.c b/erts/etc/common/erlc.c index 3683a47064..1493c6f6ff 100644 --- a/erts/etc/common/erlc.c +++ b/erts/etc/common/erlc.c @@ -748,8 +748,10 @@ call_compile_server(char** argv) ei_x_encode_atom(&args, "command_line"); argc = 0; while (argv[argc]) { + char *arg; ei_x_encode_list_header(&args, 1); - ei_x_encode_binary(&args, possibly_unquote(argv[argc]), strlen(argv[argc])); + arg = possibly_unquote(argv[argc]); + ei_x_encode_binary(&args, arg, strlen(arg)); argc++; } ei_x_encode_empty_list(&args); /* End of command_line */ |