emscripten-core/emscripten

scanf prompt loops forever

Aberta

#9.183 aberto em 8 de ago. de 2019

 (14 comentários) (2 reações) (0 responsável)C++ (3.519 forks)batch import
help wanted

Métricas do repositório

Stars
 (27.361 estrelas)
Métricas de merge de PR
 (Mesclagem média 19d 10h) (147 fundiu PRs em 30d)

Description

To illustrate the problem with scanf I prepared simple demo at

https://ihip.github.io/WASM/scanf/scanf.html

Prompt loops forever so one has to click button Cancel (both on Chrome and Firefox) or check box "Prevent this page from creating additional dialogs" (Firefox).

I propose simple solution: I added (by hand, using editor) just one flag (called scanflag) in scanf-hip.js (https://github.com/ihip/WASM/blob/master/scanf/scanf-hip.js) - it is easy to find where by using CTRL-F (altogether scanflag appears 3 times) and achieved the normal behavior of scanf which can be seen by starting the same little demo at

https://ihip.github.io/WASM/scanf/scanf-hip.html

Guia do colaborador