mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
Fix out-of-range error (MSVC2010) in idl_gen_dart.cpp (#5335)
-- MSVC2010 doesn't support indexed access to \0-terminator.
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
103f61b685
commit
b701c7d56e
@@ -120,7 +120,7 @@ class DartGenerator : public BaseGenerator {
|
||||
std::ostream_iterator<std::string>(sstream, "."));
|
||||
|
||||
auto ret = sstream.str() + ns.components.back();
|
||||
for (int i = 0; ret[i]; i++) {
|
||||
for (size_t i = 0; i < ret.size(); i++) {
|
||||
auto lower = tolower(ret[i]);
|
||||
if (lower != ret[i]) {
|
||||
ret[i] = static_cast<char>(lower);
|
||||
|
||||
Reference in New Issue
Block a user