debugger_dap: Fix a bug that seq of outgoing messages was not increasing

This commit is contained in:
kichikuou
2023-12-08 08:57:56 +09:00
parent 4b15f45897
commit f6583330de
+1 -1
View File
@@ -68,7 +68,7 @@ cJSON *create_source(const char *name) {
static void send_json(cJSON *json) {
static int seq = 0;
cJSON_AddNumberToObject(json, "seq", seq);
cJSON_AddNumberToObject(json, "seq", ++seq);
char *str = cJSON_PrintUnformatted(json);
printf("Content-Length: %zu\r\n\r\n%s", strlen(str), str);
fflush(stdout);