From 0f7e7fd2095b4e01fe4a38581d599d5cc1f1c917 Mon Sep 17 00:00:00 2001 From: jonsimantov Date: Tue, 21 May 2019 14:40:33 -0700 Subject: [PATCH] Change usage of std::string's .at() to more widely-compatible []. (#5365) --- src/idl_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/idl_parser.cpp b/src/idl_parser.cpp index c732fed21..e3538ad40 100644 --- a/src/idl_parser.cpp +++ b/src/idl_parser.cpp @@ -1327,7 +1327,7 @@ CheckedError Parser::TryTypedValue(const std::string *name, int dtoken, const auto &s = e.constant; const auto k = s.find_first_of("0123456789."); if ((std::string::npos != k) && (s.length() > (k + 1)) && - (s.at(k) == '0' && is_alpha_char(s.at(k + 1), 'X')) && + (s[k] == '0' && is_alpha_char(s[k + 1], 'X')) && (std::string::npos == s.find_first_of("pP", k + 2))) { return Error( "invalid number, the exponent suffix of hexadecimal "