提交 9f46f49b 编写于 作者: D Daniel Larimer

throw error on name overflow #149

上级 c405fc9c
...@@ -105,11 +105,10 @@ namespace eos { namespace types { ...@@ -105,11 +105,10 @@ namespace eos { namespace types {
const auto len = strnlen(str,14); const auto len = strnlen(str,14);
FC_ASSERT( len <= 13 ); FC_ASSERT( len <= 13 );
value = string_to_name(str); value = string_to_name(str);
FC_ASSERT( toString() == String(str), "name not properly normalized", ("name",String(str))("normalized",toString()) );
}FC_CAPTURE_AND_RETHROW( (str) ) } }FC_CAPTURE_AND_RETHROW( (str) ) }
Name( uint64_t v = 0 ):value(v){ Name( uint64_t v = 0 ):value(v){}
// FC_ASSERT( !(v>>(5*12)), "invalid name id" );
}
explicit operator String()const { explicit operator String()const {
static const char* charmap = ".abcdefghijklmnopqrstuvwxyz12345"; static const char* charmap = ".abcdefghijklmnopqrstuvwxyz12345";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册