Skip to content

Commit

Permalink
Fix bug/warning about temporary object lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
dsiganos committed Jan 19, 2024
1 parent ef10ef7 commit 2477ce1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nano/node/ipc/flatbuffers_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ std::shared_ptr<flatbuffers::Parser> nano::ipc::flatbuffers_handler::make_flatbu
throw nano::error ("Internal IPC error: unable to find api path");
}

char const * include_directories[] = { api_path->string ().c_str (), nullptr };
const std::string api_path_str = api_path->string ();
char const * include_directories[] = { api_path_str.c_str (), nullptr };
std::string schemafile;
if (!flatbuffers::LoadFile ((*api_path / "nanoapi.fbs").string ().c_str (), false, &schemafile))
{
Expand Down

0 comments on commit 2477ce1

Please sign in to comment.