Skip to content

Commit 0460202

Browse files
trippletme-no-dev
authored andcommitted
Fix example code (homieiot#462)
Based on Pako2s comment
1 parent 78fe403 commit 0460202

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ void onWsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventT
5858
Serial.printf("ws[%s][%u] frame[%u] %s[%llu - %llu]: ", server->url(), client->id(), info->num, (info->message_opcode == WS_TEXT)?"text":"binary", info->index, info->index + len);
5959

6060
if(info->opcode == WS_TEXT){
61-
for(size_t i=0; i < info->len; i++) {
61+
for(size_t i=0; i < len; i++) {
6262
msg += (char) data[i];
6363
}
6464
} else {
6565
char buff[3];
66-
for(size_t i=0; i < info->len; i++) {
66+
for(size_t i=0; i < len; i++) {
6767
sprintf(buff, "%02x ", (uint8_t) data[i]);
6868
msg += buff ;
6969
}

0 commit comments

Comments
 (0)