mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 22:59:47 +08:00
Added missing 'cleanup' to string's resize() method.
This commit is contained in:
parent
50a8b72697
commit
e591ab56e3
@ -437,6 +437,7 @@ namespace etl
|
||||
|
||||
current_size = new_size;
|
||||
p_buffer[new_size] = 0;
|
||||
cleanup();
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
|
||||
@ -39,7 +39,7 @@ SOFTWARE.
|
||||
|
||||
#define ETL_VERSION_MAJOR 14
|
||||
#define ETL_VERSION_MINOR 23
|
||||
#define ETL_VERSION_PATCH 0
|
||||
#define ETL_VERSION_PATCH 1
|
||||
|
||||
#define ETL_VERSION ETL_STRINGIFY(ETL_VERSION_MAJOR) ETL_STRINGIFY(ETL_VERSION_MINOR) ETL_STRINGIFY(ETL_VERSION_PATCH)
|
||||
#define ETL_VERSION_W ETL_WIDE_STRING(ETL_CONCAT(ETL_CONCAT(ETL_VERSION_MAJOR, ETL_VERSION_MINOR), ETL_VERSION_PATCH))
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
===============================================================================
|
||||
14.23.1
|
||||
Added missing 'cleanup' to string's resize() method.
|
||||
|
||||
===============================================================================
|
||||
14.23.0
|
||||
Added an optional secure mode to strings so that unused space will be cleared to zero
|
||||
|
||||
@ -3689,6 +3689,20 @@ namespace
|
||||
CHECK(std::find_if(text.end(), pe, [](Text::value_type x) { return x != 0; }) == pe);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_secure_after_resize_down)
|
||||
{
|
||||
Text text;
|
||||
text.set_secure();
|
||||
text.assign(STR("ABCDEF"));
|
||||
|
||||
Text::pointer pe = text.end();
|
||||
|
||||
text.resize(text.size() - 3U);
|
||||
|
||||
CHECK(std::find_if(text.end(), pe, [](Text::value_type x) { return x != 0; }) == pe);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST_FIXTURE(SetupFixture, test_secure_after_erase)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user