emscripten-core/emscripten

scanf prompt loops forever

Open

#9,183 创建于 2019年8月8日

在 GitHub 查看
 (14 评论) (2 反应) (0 负责人)C++ (3,519 fork)batch import
help wanted

仓库指标

Star
 (27,361 star)
PR 合并指标
 (平均合并 19天 10小时) (30 天内合并 147 个 PR)

描述

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

贡献者指南