File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -1395,9 +1395,18 @@ std::pair<int64,int64> parseBitsParameter(const char * param)
1395
1395
{
1396
1396
std::pair<int64,int64> bits{-1 , -1 };
1397
1397
const auto bitsArray = pcm::split (std::string (param),' :' );
1398
- assert (bitsArray.size () == 2 );
1399
- bits.first = (int64)read_number (bitsArray[0 ].c_str ());
1400
- bits.second = (int64)read_number (bitsArray[1 ].c_str ());
1398
+ switch ( bitsArray.size () ) {
1399
+ case 1 :
1400
+ bits.first = (int64)read_number (bitsArray[0 ].c_str ());
1401
+ bits.second = bits.first ;
1402
+ break ;
1403
+ case 2 :
1404
+ bits.first = (int64)read_number (bitsArray[0 ].c_str ());
1405
+ bits.second = (int64)read_number (bitsArray[1 ].c_str ());
1406
+ break ;
1407
+ default :
1408
+ assert (bitsArray.size () == 1 || bitsArray.size () == 2 );
1409
+ }
1401
1410
assert (bits.first >= 0 );
1402
1411
assert (bits.second >= 0 );
1403
1412
assert (bits.first < 64 );
You can’t perform that action at this time.
0 commit comments