Permalink
Browse files

Fixed one off bug in detecting size of enum ranges.

  • Loading branch information...
1 parent 933bcf9 commit d3a689fd44d01842664ef6c3edf6417b45eb264e Martin York committed Jun 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Serialize/JsonSerializer.h
View
2 Serialize/JsonSerializer.h
@@ -344,7 +344,7 @@ struct JsonImportPODValueExtractor<I, true>
std::string sev = value.getValue<std::string>();
std::string const* find = std::find(&JsonImportEnumMappings<I>::stringMap[0], &JsonImportEnumMappings<I>::stringMap[size], sev);
std::size_t dist = find - &JsonImportEnumMappings<I>::stringMap[0];
- if (dist > size)
+ if (dist >= size)
{
std::string typeName(typeid(I).name());
std::stringstream msg;

0 comments on commit d3a689f

Please sign in to comment.