Skip to content

Commit 31feaa0

Browse files
change printf to puts in assemblyscript to match the signature (#215)
Co-authored-by: Xu Jun <[email protected]>
1 parent 75009a2 commit 31feaa0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

assembly-script/wamr_app_lib/console.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44
*/
55

6-
@external("env", "printf")
6+
@external("env", "puts")
77
declare function printf(a: ArrayBuffer): i32;
88

99
export function log(a: string): void {
10-
printf(String.UTF8.encode(a + '\n', true));
10+
printf(String.UTF8.encode(a, true));
1111
}
1212

1313
export function log_number(a: number): void {
14-
printf(String.UTF8.encode(a.toString() + '\n'));
14+
printf(String.UTF8.encode(a.toString()));
1515
}

0 commit comments

Comments
 (0)