浏览代码

Add cast to remove conversion warning

bel 8 年之前
父节点
当前提交
2ba2e59952
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/civetweb.c

+ 2 - 1
src/civetweb.c

@@ -9776,7 +9776,8 @@ handle_websocket_request(struct mg_connection *conn,
 			do {
 				sep = strchr(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))
 					; // ignore leading whitespaces
 				protocol = sep;