Skip to content

Commit a25a9ec

Browse files
committed
Fixed count argument
1 parent e8643c4 commit a25a9ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/pgvector/pqxx.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ template <> struct string_traits<pgvector::Vector> {
2929

3030
// TODO don't copy string
3131
std::vector<float> result;
32-
std::stringstream ss(std::string(text.substr(1, -2)));
32+
std::stringstream ss(std::string(text.substr(1, text.size() - 2)));
3333
while (ss.good()) {
3434
std::string substr;
3535
getline(ss, substr, ',');
@@ -74,7 +74,7 @@ template <> struct string_traits<pgvector::HalfVector> {
7474

7575
// TODO don't copy string
7676
std::vector<float> result;
77-
std::stringstream ss(std::string(text.substr(1, -2)));
77+
std::stringstream ss(std::string(text.substr(1, text.size() - 2)));
7878
while (ss.good()) {
7979
std::string substr;
8080
getline(ss, substr, ',');

0 commit comments

Comments
 (0)