TIANDROID-9 (Pause-resume test hangs for D1 resolution)
RIO-6436 (PV_atof will return a value that is larger than it should be if the input string has a CR at the
end)
This fixes an issue in the PV_atof that would read in the wrong value if the input string had a CR/LF at the
end. This fixes a bug in the PVAuthor test application.
diff --git a/oscl/oscl/osclbase/src/oscl_string_utils.cpp b/oscl/oscl/osclbase/src/oscl_string_utils.cpp
index 32ae462..feef945 100644
--- a/oscl/oscl/osclbase/src/oscl_string_utils.cpp
+++ b/oscl/oscl/osclbase/src/oscl_string_utils.cpp
@@ -521,10 +521,10 @@
for (i = 0; i < length; i++)
{
- if (buf[i] == ' ' || buf[i] == '\t')
+ if (buf[i] == ' ' || buf[i] == '\t' || buf[i] == '\r' || buf[i] == '\n')
{
if (digit_found)
- break; // stop the conversion if the numeric value is ended with whitespace or tab (ie, "1.23 ")
+ break; // stop the conversion if the numeric value is ended with whitespace, tab, CR or LF (ie, "1.23 ")
else
continue; // skip leading whitespace or tab
}