Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2022-01-06 01:04:47 +0300
committerHoward Trickey <howard.trickey@gmail.com>2022-01-06 01:05:53 +0300
commit0e1da8dd120d1d2b4f699087b102ce0573ed90be (patch)
tree7ab29aa9259b6cc2cf0d19850583cf0815d2fa1e
parente55a6bf82b60b64a29b06e66f5fd45c615504fe2 (diff)
In obj exporter test, fix a strncpy length and a stray test file left behind.
-rw-r--r--source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc
index f12bfd0cea5..0feca806f35 100644
--- a/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc
+++ b/source/blender/io/wavefront_obj/tests/obj_exporter_tests.cc
@@ -229,6 +229,7 @@ TEST(obj_exporter_writer, mtllib)
}
const std::string result = read_temp_file_in_string(out_file_path);
ASSERT_EQ(result, "mtllib blah.mtl\nmtllib blah.mtl\n");
+ BLI_delete(out_file_path.c_str(), false, false);
}
/* Return true if string #a and string #b are equal after their first newline. */
@@ -286,7 +287,7 @@ class obj_exporter_regression_test : public obj_exporter_test {
BKE_tempdir_init(NULL);
std::string tempdir = std::string(BKE_tempdir_base());
std::string out_file_path = tempdir + BLI_path_basename(golden_obj.c_str());
- strncpy(params.filepath, out_file_path.c_str(), FILE_MAX);
+ strncpy(params.filepath, out_file_path.c_str(), FILE_MAX - 1);
params.blen_filepath = blendfile.c_str();
export_frame(depsgraph, params, out_file_path.c_str());
std::string output_str = read_temp_file_in_string(out_file_path);