1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

mirror: flip check on get_urlarg_by_name

https://github.com/warmcat/libwebsockets/issues/1422
This commit is contained in:
pblemel 2018-10-12 06:42:49 +08:00 committed by Andy Green
parent 33a6034875
commit e66937a5e7

View file

@ -212,7 +212,7 @@ callback_lws_mirror(struct lws *wsi, enum lws_callback_reasons reason,
* "?mirror=xxx", will be "xxx"
*/
name[0] = '\0';
if (lws_get_urlarg_by_name(wsi, "mirror", name,
if (!lws_get_urlarg_by_name(wsi, "mirror", name,
sizeof(name) - 1))
lwsl_debug("get urlarg failed\n");
if (strchr(name, '='))