summaryrefslogtreecommitdiff
path: root/src/document.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/document.cc')
-rw-r--r--src/document.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/document.cc b/src/document.cc
index 3c04ed57..da7db95e 100644
--- a/src/document.cc
+++ b/src/document.cc
@@ -158,7 +158,8 @@ optional<const char *> document_t::lookup_name(nameid_t id) const
}
}
else if (names) {
- int index = id - 1000;
+ assert(id >= 1000);
+ std::size_t index = id - 1000;
typedef names_t::nth_index<0>::type names_by_random_access;
const names_by_random_access& random_access = names->get<0>();
if (index < random_access.size())