Fix size of weights filename (#3)

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
This commit is contained in:
Shane Loretz 2019-10-04 15:15:02 -07:00 committed by GitHub
parent bcb79e66ab
commit be4fd04c0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ DetectorNetwork::DetectorNetwork(
std::unique_ptr<char> config_mutable(new char[config_file.size() + 1]);
std::unique_ptr<char> 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);