From 9bc9ce00dd4d64a85700def449d7204c83bb79ad Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 1 Aug 2020 15:24:59 +0200 Subject: Fix incorrect strncmp length --- .clang-tidy | 1 - src/Serialiser.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 7c1d49db..9f13c4fb 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -15,7 +15,6 @@ Checks: > -android-cloexec-fopen, -bugprone-branch-clone, -bugprone-forward-declaration-namespace, - -bugprone-not-null-terminated-result, -bugprone-parent-virtual-call, -bugprone-signed-char-misuse, -bugprone-suspicious-string-compare, diff --git a/src/Serialiser.cpp b/src/Serialiser.cpp index 1f102dba..96bc7f7c 100644 --- a/src/Serialiser.cpp +++ b/src/Serialiser.cpp @@ -578,7 +578,7 @@ Serialiser::Impl::serialise_properties(Sord::Node id, if (p.second.type() == _world.uris().atom_URI && !strncmp(reinterpret_cast(p.second.get_body()), "ingen:/main/", - 13)) { + 12)) { /* Value is a graph URI relative to the running engine. Chop the prefix and save the path relative to the graph file. This allows saving references to bundle resources. */ -- cgit v1.2.1