Stop using sprintf in builtin_random

This commit is contained in:
ridiculousfish
2023-08-05 19:38:34 -07:00
parent e500250775
commit 46f9a8bb28

View File

@@ -162,6 +162,6 @@ fn parse_ull(streams: &mut io_streams_t, cmd: &wstr, num: &wstr) -> Result<u64,
// Safe because end was a valid i64 and the result here is in the range start..=end.
let result: i64 = start.checked_add_unsigned(rand * step).unwrap();
streams.out.append(sprintf!(L!("%lld\n"), result));
streams.out.appendln(result.to_wstring());
return STATUS_CMD_OK;
}