forked from qt-creator/qt-creator
Unit test: Fix use-after-free
The bind() function takes a view, so we can't pass in a temporary.
Amends 3b0de99cf5
.
Change-Id: Ic11b47688ff37699a1a56e978780a610c969d3b7
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -217,7 +217,7 @@ TEST_F(SqliteStatement, BindString)
|
||||
|
||||
SqliteTestStatement statement("SELECT name, number FROM test WHERE name=?", database);
|
||||
|
||||
statement.bind(1, Utils::SmallString{"foo"});
|
||||
statement.bind(1, Utils::SmallStringView("foo"));
|
||||
statement.next();
|
||||
|
||||
ASSERT_THAT(statement.fetchSmallStringViewValue(0), "foo");
|
||||
|
Reference in New Issue
Block a user