Skip to content

Commit 054934e

Browse files
committed
DAP: Cast request's seq value to int
1 parent 53be3b7 commit 054934e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

editor/debugger/debug_adapter/debug_adapter_protocol.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,11 @@ bool DebugAdapterProtocol::process_message(const String &p_text) {
851851
Dictionary params = json.get_data();
852852
bool completed = true;
853853

854+
// While JSON does not distinguish floats and ints, "seq" is an integer by specification. See https://github.com/godotengine/godot/issues/108288
855+
if (params.has("seq")) {
856+
params["seq"] = (int)params["seq"];
857+
}
858+
854859
if (OS::get_singleton()->get_ticks_msec() - _current_peer->timestamp > _request_timeout) {
855860
Dictionary response = parser->prepare_error_response(params, DAP::ErrorType::TIMEOUT);
856861
_current_peer->res_queue.push_front(response);

0 commit comments

Comments
 (0)