Gap bugfix.
This commit is contained in:
parent
31bf615fe8
commit
4bb30deca6
@ -516,9 +516,9 @@ bool updateVal(const String* req, const char* key, byte* val, byte minv, byte ma
|
||||
{
|
||||
// we only have ~ (and perhaps -)
|
||||
if (req->charAt(pos+4) == '-') {
|
||||
*val = (int)(*val -1) < (int)minv ? maxv : (*val -1);
|
||||
*val = (int)(*val -1) < (int)minv ? maxv : min((int)maxv,(*val -1));
|
||||
} else {
|
||||
*val = (int)(*val +1) > (int)maxv ? minv : (*val +1);
|
||||
*val = (int)(*val +1) > (int)maxv ? minv : max((int)minv,(*val +1));
|
||||
}
|
||||
} else {
|
||||
out += *val;
|
||||
|
Loading…
Reference in New Issue
Block a user