The map::at method does not always exist, so instead use map::find.
[cumulus.git] / ref.cc
diff --git a/ref.cc b/ref.cc
index 7e92b7a..4418e15 100644 (file)
--- a/ref.cc
+++ b/ref.cc
@@ -25,6 +25,7 @@
 
 #include <assert.h>
 #include <stdio.h>
+#include <stdint.h>
 #include <stdlib.h>
 #include <string.h>
 #include <uuid/uuid.h>
@@ -99,7 +100,7 @@ string ObjectReference::to_string() const
         char buf[64];
         if (range_exact) {
             sprintf(buf, "[=%zu]", range_length);
-        } else if (range_start == 0) {
+        } else if (type == REF_ZERO) {
             sprintf(buf, "[%zu]", range_length);
         } else {
             sprintf(buf, "[%zu+%zu]", range_start, range_length);