WASM: fix save-file generation.

In commit f6434e84964d840 I said I had replaced all uses of
old-Emscripten's Pointer_stringify() function with new-Emscripten's
UTF8ToString(). In fact, I only replaced the ones in emcclib.js, but I
missed one in emccpre.js used in preparing downloadable save files.
Those were therefore broken, with a Javascript undefined-name error.
This commit is contained in:
Simon Tatham
2021-05-22 21:04:22 +01:00
parent 20a85890d7
commit 1c760b2ee8

View File

@ -372,7 +372,7 @@ function initPuzzle() {
document.getElementById("save").onclick = function(event) { document.getElementById("save").onclick = function(event) {
if (dlg_dimmer === null) { if (dlg_dimmer === null) {
var savefile_ptr = get_save_file(); var savefile_ptr = get_save_file();
var savefile_text = Pointer_stringify(savefile_ptr); var savefile_text = UTF8ToString(savefile_ptr);
free_save_file(savefile_ptr); free_save_file(savefile_ptr);
dialog_init("Download saved-game file"); dialog_init("Download saved-game file");
dlg_form.appendChild(document.createTextNode( dlg_form.appendChild(document.createTextNode(