ref: 1c760b2ee808ba68781a68a57292cc841b3df5a0
parent: 20a85890d713d9a6b701eee08a76538f0a4334e4
author: Simon Tatham <anakin@pobox.com>
date: Sat May 22 17:04:22 EDT 2021
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.
--- a/emccpre.js
+++ b/emccpre.js
@@ -372,7 +372,7 @@
document.getElementById("save").onclick = function(event) {
if (dlg_dimmer === null) {
var savefile_ptr = get_save_file();
- var savefile_text = Pointer_stringify(savefile_ptr);
+ var savefile_text = UTF8ToString(savefile_ptr);
free_save_file(savefile_ptr);
dialog_init("Download saved-game file");
dlg_form.appendChild(document.createTextNode(