From 0e78a496e564ad1064de6d895228502728601aa2 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Fri, 22 Sep 2023 15:40:07 +0200 Subject: [PATCH] [sfml] Fix testbed file format check. --- spine-sfml/cpp/example/testbed.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-sfml/cpp/example/testbed.cpp b/spine-sfml/cpp/example/testbed.cpp index 080e509d2..ffe5f3ed5 100644 --- a/spine-sfml/cpp/example/testbed.cpp +++ b/spine-sfml/cpp/example/testbed.cpp @@ -40,7 +40,7 @@ int main(void) { SFMLTextureLoader textureLoader; Atlas *atlas = new Atlas(atlasFile, &textureLoader); SkeletonData *skeletonData = nullptr; - if (strncmp(skeletonFile.buffer(), ".skel", skeletonFile.length()) > 0) { + if (strnstr(skeletonFile.buffer(), ".skel", skeletonFile.length())) { SkeletonBinary binary(atlas); binary.setScale(scale); skeletonData = binary.readSkeletonDataFile(skeletonFile);