Ver Fonte

Add cast to remove conversion warning

bel há 8 anos atrás
pai
commit
2ba2e59952
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      src/civetweb.c

+ 2 - 1
src/civetweb.c

@@ -9776,7 +9776,8 @@ handle_websocket_request(struct mg_connection *conn,
 			do {
 			do {
 				sep = strchr(protocol, ',');
 				sep = strchr(protocol, ',');
 				curSubProtocol = protocol;
 				curSubProtocol = protocol;
-				len = sep ? (unsigned long)(sep - protocol) : strlen(protocol);
+				len = sep ? (unsigned long)(sep - protocol)
+				          : (unsigned long)strlen(protocol);
 				while (sep && isspace(*++sep))
 				while (sep && isspace(*++sep))
 					; // ignore leading whitespaces
 					; // ignore leading whitespaces
 				protocol = sep;
 				protocol = sep;