Merge pull request #9 from bitshares/abitmore-patch-1
static_variant::set_which() rejects negative param
This commit is contained in:
commit
a1e1599f97
1 changed files with 1 additions and 0 deletions
|
|
@ -327,6 +327,7 @@ public:
|
|||
|
||||
static int count() { return impl::type_info<Types...>::count; }
|
||||
void set_which( int w ) {
|
||||
FC_ASSERT( w >= 0 );
|
||||
FC_ASSERT( w < count() );
|
||||
this->~static_variant();
|
||||
_tag = w;
|
||||
|
|
|
|||
Loading…
Reference in a new issue