mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-15 09:55:39 +02:00
Fix string iteration accesses null terminator. cppcheck complains. Alternatively, if this is intentional, a comment would be appreciated, such as: // intentional access of terminating-'\0'
This commit is contained in:
2
include/external/clara.h
vendored
2
include/external/clara.h
vendored
@@ -550,7 +550,7 @@ namespace Clara {
|
||||
}
|
||||
|
||||
void parseIntoTokens( std::string const& arg, std::vector<Token>& tokens ) {
|
||||
for( std::size_t i = 0; i <= arg.size(); ++i ) {
|
||||
for( std::size_t i = 0; i < arg.size(); ++i ) {
|
||||
char c = arg[i];
|
||||
if( c == '"' )
|
||||
inQuotes = !inQuotes;
|
||||
|
Reference in New Issue
Block a user