mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
fix param out of scope check, avoids some exceptions
This commit is contained in:
+8
-3
@@ -1625,15 +1625,20 @@ String WiFiManager::getParamOut(){
|
||||
bool tok_c = HTTP_PARAM_temp.indexOf(FPSTR(T_c)) > 0;
|
||||
|
||||
char valLength[5];
|
||||
// add the extra parameters to the form
|
||||
|
||||
for (int i = 0; i < _paramsCount; i++) {
|
||||
if (_params[i] == NULL || _params[i]->_length == 0) {
|
||||
Serial.println((String)_params[i]->_length);
|
||||
if (_params[i] == NULL || _params[i]->_length == 0 || _params[i]->_length > 99999) {
|
||||
// try to detect param scope issues, doesnt always catch but works ok
|
||||
#ifdef WM_DEBUG_LEVEL
|
||||
DEBUG_WM(DEBUG_ERROR,F("[ERROR] WiFiManagerParameter is out of scope"));
|
||||
#endif
|
||||
break;
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
// add the extra parameters to the form
|
||||
for (int i = 0; i < _paramsCount; i++) {
|
||||
// label before or after, @todo this could be done via floats or CSS and eliminated
|
||||
String pitem;
|
||||
switch (_params[i]->getLabelPlacement()) {
|
||||
|
||||
Reference in New Issue
Block a user