Fs: use strncmp instead of memcmp for comparing strings

This commit is contained in:
Bert Belder committed 2011-11-25 09:35:52 +01:00
1 parent 1f16a7b6e5
commit 5b014e0725
1 file changed
+2 -2
+2 -2
View File
@@ -256,9 +256,9 @@ Local<Value> FSError(int errorno,
if (path) {
#ifdef _WIN32
if (memcmp(path, "\\\\?\\UNC\\", 8) == 0) {
if (strncmp(path, "\\\\?\\UNC\\", 8) == 0) {
path_str = String::Concat(String::New("\\\\"), String::New(path + 8));
} else if (memcmp(path, "\\\\?\\", 4) == 0) {
} else if (strncmp(path, "\\\\?\\", 4) == 0) {
path_str = String::New(path + 4);
} else {
path_str = String::New(path);