Make compilation on Windows work again.
Fixes #1205 .
--
Change-Id: Ifd35cf141737f755b499a786cf9663153cd2cf53
Reviewed-on: https://bazel-review.googlesource.com/#/c/3513/
MOS_MIGRATED_REVID=120998788
diff --git a/src/main/cpp/blaze_util_mingw.cc b/src/main/cpp/blaze_util_mingw.cc
index 6e195cf..136068d 100644
--- a/src/main/cpp/blaze_util_mingw.cc
+++ b/src/main/cpp/blaze_util_mingw.cc
@@ -185,7 +185,7 @@
}
}
- if (cmdline.length() >= max_len) {
+ if (cmdline.size() >= MAX_CMDLINE_LENGTH) {
pdie(blaze_exit_code::INTERNAL_ERROR,
"Command line too long: %s", cmdline.c_str());
}
@@ -193,7 +193,7 @@
// Copy command line into a mutable buffer.
// CreateProcess is allowed to mutate its command line argument.
strncpy(result->cmdline, cmdline.c_str(), MAX_CMDLINE_LENGTH - 1);
- result[MAX_CMDLINE_LENGTH - 1] = 0;
+ result->cmdline[MAX_CMDLINE_LENGTH - 1] = 0;
}
} // namespace