aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/io/marshalls.cpp7
-rw-r--r--core/script_debugger_remote.cpp2
2 files changed, 6 insertions, 3 deletions
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp
index c5d59f786..e701a89c7 100644
--- a/core/io/marshalls.cpp
+++ b/core/io/marshalls.cpp
@@ -807,11 +807,16 @@ static void _encode_string(const String &p_string, uint8_t *&buf, int &r_len) {
encode_uint32(utf8.length(), buf);
buf += 4;
copymem(buf, utf8.get_data(), utf8.length());
+ buf += utf8.length();
}
r_len += 4 + utf8.length();
- while (r_len % 4)
+ while (r_len % 4) {
r_len++; //pad
+ if (buf) {
+ buf++;
+ }
+ }
}
Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bool p_object_as_id) {
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index 25f0044cc..9e4f4380c 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -142,8 +142,6 @@ void ScriptDebuggerRemote::debug(ScriptLanguage *p_script, bool p_can_continue)
ERR_FAIL();
}
- OS::get_singleton()->enable_for_stealing_focus(ProjectSettings::get_singleton()->get("editor_pid"));
-
packet_peer_stream->put_var("debug_enter");
packet_peer_stream->put_var(2);
packet_peer_stream->put_var(p_can_continue);