about summary refs log tree commit diff stats
path: root/subx/011run.cc
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-07-25 13:40:42 -0700
committerKartik Agaram <vc@akkartik.com>2019-07-25 13:59:17 -0700
commitecbdc925d43f489e5c5b101900db88f9d260efe7 (patch)
tree626f31eebe26ccdc527c5d999ac87375e472bb88 /subx/011run.cc
parent34e1828162deec95b1913b420e7aee605d68fa82 (diff)
downloadmu-ecbdc925d43f489e5c5b101900db88f9d260efe7.tar.gz
5476
Fix CI. Also kill compiler version mismatch bugs once and for all.
Diffstat (limited to 'subx/011run.cc')
-rw-r--r--subx/011run.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/subx/011run.cc b/subx/011run.cc
index ca568a98..cc3b82f6 100644
--- a/subx/011run.cc
+++ b/subx/011run.cc
@@ -300,7 +300,7 @@ const segment* find(const program& p, const string& segment_name) {
 }
 
 uint8_t hex_byte(const string& s) {
-  if (std::any_of(s.begin(), s.end(), isupper)) {
+  if (contains_uppercase(s)) {
     raise << "uppercase hex not allowed: " << s << '\n' << end();
     return 0;
   }
@@ -459,3 +459,9 @@ string to_string(const word& w) {
     out << " /" << w.metadata.at(i);
   return out.str();
 }
+
+bool contains_uppercase(const string& s) {
+  for (int i = 0;  i < SIZE(s);  ++i)
+    if (isupper(s.at(i))) return true;
+  return false;
+}