bug in error case
diff --git a/main.cpp b/main.cpp
index 0651b6f..fc3499d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -210,7 +210,7 @@
     uint32_t next(uint32_t p) {
         auto f = m.upper_bound(p);
         if (f == m.end()) {
-            std::numeric_limits<uint32_t>::max();
+            return std::numeric_limits<uint32_t>::max();
         }
         return f->first;
     }