diff --git a/lib/lws-plat-esp32.c b/lib/lws-plat-esp32.c index e14d96d2..c00c9339 100644 --- a/lib/lws-plat-esp32.c +++ b/lib/lws-plat-esp32.c @@ -38,9 +38,10 @@ unsigned long long time_in_microseconds(void) LWS_VISIBLE int lws_get_random(struct lws_context *context, void *buf, int len) { + uint8_t *pb = buf; while (len) { uint32_t r = esp_random(); - uint8_t *p = (uint8_t *)&r, *pb = buf; + uint8_t *p = (uint8_t *)&r; int b = 4; if (len < b)