summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/activeharmony/fix_logical_bug_in_slave_list_parsing.patch
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/activeharmony/fix_logical_bug_in_slave_list_parsing.patch')
-rw-r--r--var/spack/repos/builtin/packages/activeharmony/fix_logical_bug_in_slave_list_parsing.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/activeharmony/fix_logical_bug_in_slave_list_parsing.patch b/var/spack/repos/builtin/packages/activeharmony/fix_logical_bug_in_slave_list_parsing.patch
new file mode 100644
index 0000000000..08141143d9
--- /dev/null
+++ b/var/spack/repos/builtin/packages/activeharmony/fix_logical_bug_in_slave_list_parsing.patch
@@ -0,0 +1,29 @@
+diff --git a/code-server/code_generator.cxx b/code-server/code_generator.cxx
+index df25400..1c213f7 100644
+--- a/code-server/code_generator.cxx
++++ b/code-server/code_generator.cxx
+@@ -574,13 +574,13 @@ int parse_slave_list(const char* hostlist)
+ }
+
+ // Skip leading whitespace.
+- while (head < tail && (head == '\0' || isspace(*head))) {
++ while (head < tail && (*head == '\0' || isspace(*head))) {
+ ++head;
+ }
+ host_ptr = head;
+
+ // Find host boundary whitespace.
+- while (head < tail && (head != '\0' && !isspace(*head))) {
++ while (head < tail && (*head != '\0' && !isspace(*head))) {
+ ++head;
+ }
+ host = string(host_ptr, head++);
+@@ -596,7 +596,7 @@ int parse_slave_list(const char* hostlist)
+ }
+
+ // Skip trailing whitespace.
+- while (head < tail && (head == '\0' || isspace(*head))) {
++ while (head < tail && (*head == '\0' || isspace(*head))) {
+ ++head;
+ }
+