mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-17 11:12:25 +01: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:
parent
f666f5f0ae
commit
bbfb64dfe6
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 ) {
|
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];
|
char c = arg[i];
|
||||||
if( c == '"' )
|
if( c == '"' )
|
||||||
inQuotes = !inQuotes;
|
inQuotes = !inQuotes;
|
||||||
|
Loading…
Reference in New Issue
Block a user