1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Use stdout/-err for all messages in HTML5 platform

This commit is contained in:
Leon Krause
2019-02-24 04:40:06 +01:00
parent 81554dac61
commit 76522624cb
4 changed files with 8 additions and 8 deletions

View File

@@ -82,7 +82,7 @@ var GodotHTTPRequest = {
godot_xhr_send_string: function(xhrId, strPtr) {
if (!strPtr) {
console.warn("Failed to send string per XHR: null pointer");
err("Failed to send string per XHR: null pointer");
return;
}
GodotHTTPRequest.requests[xhrId].send(UTF8ToString(strPtr));
@@ -90,11 +90,11 @@ var GodotHTTPRequest = {
godot_xhr_send_data: function(xhrId, ptr, len) {
if (!ptr) {
console.warn("Failed to send data per XHR: null pointer");
err("Failed to send data per XHR: null pointer");
return;
}
if (len < 0) {
console.warn("Failed to send data per XHR: buffer length less than 0");
err("Failed to send data per XHR: buffer length less than 0");
return;
}
GodotHTTPRequest.requests[xhrId].send(HEAPU8.subarray(ptr, ptr + len));