let setData use double values instead of strings.
this allows for storing value set with setData which can then be used in the cgi module to retrieve the last value set.
This commit is contained in:
@@ -312,10 +312,29 @@ const char *_readValueAndProbablyRange(const char *s, uint64_t *ptrBitField, int
|
||||
{
|
||||
int v=0;
|
||||
|
||||
while(isdigit(*s)) {
|
||||
v*=10;
|
||||
v+=(*s)-'0';
|
||||
s++;
|
||||
if (*s=='#') {
|
||||
while(*s) {
|
||||
unsigned char c;
|
||||
|
||||
c=tolower(*s);
|
||||
if ((c>='0' && c<='9') || (c>='a' && c<='f')) {
|
||||
c-='0';
|
||||
if (c>9)
|
||||
c-=7;
|
||||
v<<=4;
|
||||
v+=c;
|
||||
}
|
||||
else
|
||||
break;
|
||||
s++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
while(isdigit(*s)) {
|
||||
v*=10;
|
||||
v+=(*s)-'0';
|
||||
s++;
|
||||
}
|
||||
}
|
||||
if (!_valueOkay(v, minValue, maxValue)) {
|
||||
DBG_INFO(NULL, "here");
|
||||
|
||||
Reference in New Issue
Block a user