From 037069602b579b32f612556b618bd219807efb10 Mon Sep 17 00:00:00 2001 From: guochunwei <1057506117@qq.com> Date: Wed, 18 Jun 2025 12:31:56 +0800 Subject: [PATCH] Fix SPZ load points error. --- 3rdparty/spz/load-spz.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/3rdparty/spz/load-spz.cc b/3rdparty/spz/load-spz.cc index e8e36c2..370f05c 100644 --- a/3rdparty/spz/load-spz.cc +++ b/3rdparty/spz/load-spz.cc @@ -628,7 +628,7 @@ GaussianCloud loadSplatFromPly(std::istream& in, const std::string& filename, co SpzLog("[SPZ] Loading %d points", numPoints); std::unordered_map fields; // name -> index - for (int32_t i = 0;; i++) { + for (int32_t i = 0;;) { std::getline(in, line); if (line == "end_header") break; if (line.find("comment") != std::string::npos) continue; @@ -640,6 +640,7 @@ GaussianCloud loadSplatFromPly(std::istream& in, const std::string& filename, co } std::string name = line.substr(std::strlen("property float ")); fields[name] = i; + i++; } // Returns the index for a given field name, ensuring the name exists. -- Gitee