mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
Fix ASAN error in vectorstream_test
This commit is contained in:
@@ -103,11 +103,13 @@ static int vectorstream_test()
|
||||
std_stringstream << "testline: " << i << std::endl;
|
||||
}
|
||||
//Add final null to form a c string
|
||||
my_vectorstream.swap_vector(myvector);
|
||||
myvector.push_back(0);
|
||||
if(std::strcmp(&(my_vectorstream.vector()[0]), std_stringstream.str().c_str()) != 0){
|
||||
if(std::strcmp(&(myvector[0]), std_stringstream.str().c_str()) != 0){
|
||||
return 1;
|
||||
}
|
||||
myvector.pop_back();
|
||||
my_vectorstream.swap_vector(myvector);
|
||||
for(int i = 0; i < 100; ++i){
|
||||
my_vectorstream >> str1 >> number1;
|
||||
std_stringstream >> str2 >> number2;
|
||||
|
||||
Reference in New Issue
Block a user