Merge pull request #9 from bitshares/abitmore-patch-1

static_variant::set_which() rejects negative param
This commit is contained in:
oxarbitrage 2018-01-21 09:34:55 -03:00 committed by GitHub
commit a1e1599f97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;