summaryrefslogtreecommitdiffhomepage
path: root/entity/erased-constraints.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'entity/erased-constraints.cpp')
-rw-r--r--entity/erased-constraints.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/entity/erased-constraints.cpp b/entity/erased-constraints.cpp
index 599b4164..031197eb 100644
--- a/entity/erased-constraints.cpp
+++ b/entity/erased-constraints.cpp
@@ -27,8 +27,16 @@ template<typename T> std::pair<T, T> range::convert() const
}
else
{
- fm_assert(type == type_uint);
- return { T(min.u), T(max.u) };
+ if (type == type_int)
+ {
+ fm_assert(min.i >= 0 && max.i >= 0);
+ return { T(min.i), T(max.i) };
+ }
+ else
+ {
+ fm_assert(type == type_uint);
+ return { T(min.u), T(max.u) };
+ }
}
}
else