Skip to content

Commit

Permalink
Fixed count argument
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jan 15, 2025
1 parent e8643c4 commit a25a9ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/pgvector/pqxx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ template <> struct string_traits<pgvector::Vector> {

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

// TODO don't copy string
std::vector<float> result;
std::stringstream ss(std::string(text.substr(1, -2)));
std::stringstream ss(std::string(text.substr(1, text.size() - 2)));
while (ss.good()) {
std::string substr;
getline(ss, substr, ',');
Expand Down

0 comments on commit a25a9ec

Please sign in to comment.