aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2019-09-17 16:40:47 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2019-09-17 16:40:47 +0200
commitf830da36d2c720d225f89a809a4b8ee1b5a9ca62 (patch)
tree59a49fa4d4e8c1c944fe2f01592065d7b3d45a93
parentb4d21096ed4cc38b6131bdd30fece5b88c77a654 (diff)
downloadbbs-f830da36d2c720d225f89a809a4b8ee1b5a9ca62.tar.gz
asdf
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index b7aa583..81b7035 100644
--- a/src/main.c
+++ b/src/main.c
@@ -129,7 +129,8 @@ void handle_connection(int _socket, struct sockaddr_in _addr, int argc, char* ar
char *needle = strstr(buff, "\r");
if (needle){ //Replace CR with space
needle[0] = '\n';
- (needle - buff + 1) < buffsize ? needle[1]='\0':;
+ if ((needle - buff + 1) < buffsize)
+ needle[1]='\0':;
}
if(try_write(in[1], buff, cnt, 100)) {