emscripten-core/emscripten

scanf prompt loops forever

開放

#9,183 建立於 2019年8月8日

 (14 則留言) (2 個反應) (0 位負責人)C++ (3,519 個分叉)batch import
help wanted

倉庫指標

星標
 (27,361 顆星)
PR 合併指標
 (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

貢獻者指南