Closed DaveDavenport closed 2 years ago
there is a change in here that leads to the result of String.IndexOf() to be set to an unsigned int, but this function returns -1 if the substring is not found
there is a change in here that leads to the result of String.IndexOf() to be set to an unsigned int, but this function returns -1 if the substring is not found
aah yes thanks, i intended to look that one up (Because it compared against 0 or eos I was not sure).. does that mean that there is a bug in the code anyway given it does not check for this?
(p.s. you can add comments inline in the diff view)
changed it to:
- if ((pos == 0) || (pos == (sIn.length() - 1))) return false; // no key or no value
+ if ((pos <= 0) || (((unsigned int)pos) == (sIn.length() - 1))) return false; // no key or no value
Making constant strings const. Right signedness (need some more). time_t -> unsigned long (for use with millis). Fix some data types for printf. Removed unused variables
Untested, not all warnings fixed, some signedness/unsigned conversion remaining.