8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d06d80 commit 36e42aaCopy full SHA for 36e42aa
src/path.cc
@@ -24,15 +24,14 @@ std::string NormalizeString(const std::string_view path,
24
int lastSegmentLength = 0;
25
int lastSlash = -1;
26
int dots = 0;
27
- char code;
28
- const auto pathLen = path.size();
29
- for (uint8_t i = 0; i <= pathLen; ++i) {
30
- if (i < pathLen) {
+ char code = 0;
+ for (size_t i = 0; i <= path.size(); ++i) {
+ if (i < path.size()) {
31
code = path[i];
32
- } else if (IsPathSeparator(path[i])) {
+ } else if (IsPathSeparator(code)) {
33
break;
34
} else {
35
- code = node::kPathSeparator;
+ code = '/';
36
}
37
38
if (IsPathSeparator(code)) {
0 commit comments