mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #285] When WIFI_MANAGER_MAX_PARAMS is too small the library messes up previously defined custom parameters #238
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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_PARAMSis 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_paramsCountvalue is, and when it is higher thenWIFI_MANAGER_MAX_PARAMS, discard the new parameter and make a debug logging inform the developer that he should increase the define.