Cycling bugfix.
This commit is contained in:
parent
00f1b483eb
commit
0acca2e313
@ -530,9 +530,9 @@ bool updateVal(const String* req, const char* key, byte* val, byte minv, byte ma
|
|||||||
if (out == 0)
|
if (out == 0)
|
||||||
{
|
{
|
||||||
if (req->charAt(pos+4) == '-') {
|
if (req->charAt(pos+4) == '-') {
|
||||||
*val = min((int)maxv, max((int)minv, (int)(*val -1)));
|
*val = (int)(*val -1) < (int)minv ? maxv : min((int)maxv,(*val -1));
|
||||||
} else {
|
} else {
|
||||||
*val = min((int)maxv, max((int)minv, (int)(*val +1)));
|
*val = (int)(*val +1) > (int)maxv ? minv : max((int)minv,(*val +1));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out += *val;
|
out += *val;
|
||||||
|
Loading…
Reference in New Issue
Block a user