math: Use simpler format string

It seems like musl's printf here fails on `%*lc`. So we use `%*ls`,
which we already use in string, so it should work.
This commit is contained in:
Fabian Homborg
2018-12-16 20:27:30 +01:00
parent ba8748877a
commit 217486e547

View File

@@ -206,7 +206,7 @@ static int evaluate_expression(const wchar_t *cmd, parser_t &parser, io_streams_
} else {
streams.err.append_format(L"%ls: Error: %ls\n", cmd, math_describe_error(error).c_str());
streams.err.append_format(L"'%ls'\n", expression.c_str());
streams.err.append_format(L"%*lc^\n", error.position - 1, L' ');
streams.err.append_format(L"%*ls%ls\n", error.position - 1, L" ",L"^");
retval = STATUS_CMD_ERROR;
}
setlocale(LC_NUMERIC, saved_locale);