Skip to content

Commit

Permalink
Fix parseGltfCopyright (again).
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Feb 12, 2025
1 parent d085706 commit b659f72
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

### v0.44.3 - 2025-02-12

##### Fixes :wrench:

- Fixed another bug in `GltfUtilities::parseGltfCopyright` that could cause it to crash or produce incorrect results.

### v0.44.2 - 2025-02-10

##### Fixes :wrench:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ endif()
include("cmake/defaults.cmake")

project(cesium-native
VERSION 0.44.2
VERSION 0.44.3
LANGUAGES CXX C
)

Expand Down
9 changes: 7 additions & 2 deletions CesiumGltfContent/src/GltfUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,13 @@ std::string_view trimWhitespace(const std::string_view& s) {
size_t end = s.find_last_not_of(" \t");
if (end == std::string::npos)
return {};
size_t start = s.find_first_not_of(" \t", 0, end + 1);
return s.substr(start, end - start + 1);

std::string_view trimmedRight = s.substr(0, end + 1);
size_t start = trimmedRight.find_first_not_of(" \t");
if (start == std::string::npos)
return {};

return trimmedRight.substr(start);
}
} // namespace

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cesium-native",
"version": "0.44.2",
"version": "0.44.3",
"description": "Cesium 3D Geospatial for C++",
"main": "index.js",
"directories": {
Expand Down

0 comments on commit b659f72

Please sign in to comment.