Skip to content

Commit 20202c4

Browse files
authored
Merge pull request #878 from szczukot/1wire
Fix fo is_number() method
2 parents 4c7467f + a8d4a20 commit 20202c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/Helper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ void rgb2hsb(const int r, const int g, const int b, float hsbvals[3])
596596
bool is_number(const std::string& s)
597597
{
598598
std::string::const_iterator it = s.begin();
599-
while (it != s.end() && (isdigit(*it) || (*it == '.') || (*it == '-') || (*it == ' '))) ++it;
599+
while (it != s.end() && (isdigit(*it) || (*it == '.') || (*it == '-') || (*it == ' ') || (*it == 0x00))) ++it;
600600
return !s.empty() && it == s.end();
601601
}
602602

0 commit comments

Comments
 (0)