handle tokens stating with '.'

This commit is contained in:
conrad
2021-11-17 15:17:44 +10:00
parent 3d6fd3139a
commit c223b70d2d
+11
View File
@@ -463,6 +463,17 @@ diskio::convert_token(eT& val, const std::string& token)
{
// signed integer
if((str[0] == '.') && (N >= 2))
{
const char* str_offset1 = &(str[1]);
std::strtoll(str_offset1, &endptr, 10);
if(str_offset1 == endptr) { return false; }
val = eT(0); return true;
}
val = eT( std::strtoll(str, &endptr, 10) );
}
else