spacehuhn / esp8266_beaconSpam

Creates up to a thousand WiFi access points with custom SSIDs.
MIT License
1k stars 200 forks source link

Channel 13 is always added #40

Open atom-smasher opened 2 years ago

atom-smasher commented 2 years ago

Channel 13 is always added, when two or more channels are specified.

Test case, set two channels:

const uint8_t channels[] = {4, 5};

What's actually used are channels 4, 5, and 13

This line:

    if (channelIndex > sizeof(channels)) channelIndex = 0;

Needs to be changed to:

    if (channelIndex >= sizeof(channels)) channelIndex = 0;
atom-smasher commented 2 years ago

The problem was actually something else, fixed here - https://github.com/atom-smasher/esp8266_beaconSpam