Commit e7eeb700 authored by Warren Falk's avatar Warren Falk Committed by Jie Luo

fix index out of range error in C# generation using msvc (#1329)

parent b61dd9d9
......@@ -169,7 +169,7 @@ std::string UnderscoresToCamelCase(const std::string& input,
}
}
// Add a trailing "_" if the name should be altered.
if (input[input.size() - 1] == '#') {
if (input.size() > 0 && input[input.size() - 1] == '#') {
result += '_';
}
return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment