mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05: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:
@@ -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};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user