emscripten-core / emscripten-core/emscripten

fprintf/printf output not displayed without newline

Open
#14,285 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

If a C program does not have a newline at the end of the string passed as an argument to fprintf or printf when generating Wasm from C, the output is not displayed. The first example at https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm with the newline of the printf removed will demonstrate this issue.

`
#include

int main() {
printf("Hello World");
}

For this example, there is no output from the program displayed on the web page.
`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.