[GH-ISSUE #285] When WIFI_MANAGER_MAX_PARAMS is too small the library messes up previously defined custom parameters #238

Closed
opened 2026-02-28 01:24:15 +03:00 by kerem · 0 comments
Owner

Originally created by @vyruz1986 on GitHub (Jan 8, 2017).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/285

By default this is set to 10.
In my project I had to define more than 10 custom parameters, but was not aware of this limitation.
The problem is that even when the WIFI_MANAGER_MAX_PARAMS is exceeded the library keeps happily adding extra parameters, but is actually overwriting previously added ones. Probably due to the array being only 10 large it wraps around.

It would be better in WiFiManager::addParameter() to check what the current _paramsCount value is, and when it is higher then WIFI_MANAGER_MAX_PARAMS, discard the new parameter and make a debug logging inform the developer that he should increase the define.

Originally created by @vyruz1986 on GitHub (Jan 8, 2017). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/285 By default this is set to 10. In my project I had to define more than 10 custom parameters, but was not aware of this limitation. The problem is that even when the `WIFI_MANAGER_MAX_PARAMS` is exceeded the library keeps happily adding extra parameters, but is actually overwriting previously added ones. Probably due to the array being only 10 large it wraps around. It would be better in `WiFiManager::addParameter()` to check what the current `_paramsCount` value is, and when it is higher then `WIFI_MANAGER_MAX_PARAMS`, discard the new parameter and make a debug logging inform the developer that he should increase the define.
kerem closed this issue 2026-02-28 01:24:15 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#238
No description provided.