wasm new line fix
This commit is contained in:
@@ -25,7 +25,11 @@ fn void os_error_box(char *str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn void os_console_log(char *str) {
|
fn void os_console_log(char *str) {
|
||||||
wasm_write_to_console((isize)str, str_len(str));
|
s8_t string = s8_from_char(str);
|
||||||
|
if (s8_ends_with(string, s8_lit("\n"), false)) {
|
||||||
|
string = s8_chop(string, 1);
|
||||||
|
}
|
||||||
|
wasm_write_to_console((isize)string.str, (i32)string.len);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn f64 os_parse_float(char *str) {
|
fn f64 os_parse_float(char *str) {
|
||||||
|
|||||||
Reference in New Issue
Block a user