mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-12 22:50:54 +03:00
Use actual root path length
Previously a one was added just to use for the length with the null byte when creating the root path passed to fts_open. Closes #391
This commit is contained in:
parent
1561f22853
commit
110d3719bb
@ -166,8 +166,8 @@ namespace v8_extensions {
|
||||
}
|
||||
else if (name == "traverseTree") {
|
||||
std::string argument = arguments[0]->GetStringValue().ToString();
|
||||
int rootPathLength = argument.size() + 1;
|
||||
char rootPath[rootPathLength];
|
||||
int rootPathLength = argument.size();
|
||||
char rootPath[rootPathLength + 1];
|
||||
strcpy(rootPath, argument.c_str());
|
||||
char * const paths[] = {rootPath, NULL};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user