From 8d387df7d75e8cb3a271d3120eb6f6de0707a10d Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Fri, 31 Mar 2023 18:21:06 +0200 Subject: [PATCH] removing control characters from sent --- src/chat/misc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/chat/misc.c b/src/chat/misc.c index 5a2c6a1..976aa07 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -317,6 +317,13 @@ void *why2_communicate_thread(void *arg) { //READ raw = read_socket_raw(connection.connection); + + //REMOVE CONTROL CHARACTERS FROM raw + for (size_t i = 0; i < strlen(raw); i++) + { + if (raw[i] == '\\') raw[i] = '/'; + } + received = read_socket_from_raw(raw); if (received == NULL || raw == NULL) return NULL; //FAILED; EXIT THREAD