Skip to content

Commit

Permalink
Fix command ptr array references
Browse files Browse the repository at this point in the history
Fixes #6
  • Loading branch information
Kagami committed Mar 8, 2017
1 parent 3e702e6 commit 78f33ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,8 @@ class MPVInstance : public pp::Instance {
std::vector<std::string> args_str(len);
std::vector<const char*> args_ptr(len + 1);
for (uint32_t i = 0; i < len; i++) {
std::string arg = args.Get(i).AsString();
args_str[i] = arg;
args_ptr[i] = arg.c_str();
args_str[i] = args.Get(i).AsString();
args_ptr[i] = args_str[i].c_str();
}
args_ptr[len] = NULL;
mpv_command(mpv_, args_ptr.data());
Expand Down

0 comments on commit 78f33ec

Please sign in to comment.