mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-22 13:24:42 +02:00
[BUG_FIXED] Fix the crash by using wide card to open files on cmdline.
By using string instead of char * in the constructor std::string::string() make a call: string (const string& str, size_t pos, size_t len = npos); instead of: string (const char* s, size_t n);
This commit is contained in:
parent
091082c31c
commit
dc4897c8f2
@ -262,7 +262,11 @@ BufferID Notepad_plus::doOpen(const generic_string& fileName, bool isRecursive,
|
||||
size_t pos = substring - fileName.c_str();
|
||||
|
||||
patterns.push_back(substring + 1);
|
||||
generic_string dir(fileName, pos + 1);
|
||||
generic_string dir(fileName.c_str(), pos + 1); // use char * to evoke:
|
||||
// string (const char* s, size_t n);
|
||||
// and avoid to call (if pass string) :
|
||||
// string (const string& str, size_t pos, size_t len = npos);
|
||||
|
||||
getMatchedFileNames(dir.c_str(), patterns, fileNames, isRecursive, false);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user