From be4fd04c0ea8fbed80b3549283701e16145422c6 Mon Sep 17 00:00:00 2001 From: Shane Loretz Date: Fri, 4 Oct 2019 15:15:02 -0700 Subject: [PATCH] Fix size of weights filename (#3) Signed-off-by: Shane Loretz --- src/detector_network.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detector_network.cpp b/src/detector_network.cpp index 6a9121ca..867e8ff2 100644 --- a/src/detector_network.cpp +++ b/src/detector_network.cpp @@ -69,7 +69,7 @@ DetectorNetwork::DetectorNetwork( std::unique_ptr config_mutable(new char[config_file.size() + 1]); std::unique_ptr weights_mutable(new char[weights_file.size() + 1]); snprintf(&*config_mutable, config_file.size() + 1, "%s", config_file.c_str()); - snprintf(&*weights_mutable, config_file.size() + 1, "%s", weights_file.c_str()); + snprintf(&*weights_mutable, weights_file.size() + 1, "%s", weights_file.c_str()); const int clear = 0; impl_->network_ = load_network(&*config_mutable, &*weights_mutable, clear);