File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -356,17 +356,17 @@ inline types::BinaryVector convertToBinary(const std::string& i_value)
356356 " Provide a valid hexadecimal input. (Ex. 0x30313233)" );
357357 }
358358
359- if (i_value.length () % 2 != 0 )
360- {
361- throw std::runtime_error (
362- " Write option accepts 2 digit hex numbers. (Ex. 0x1 "
363- " should be given as 0x01)." );
364- }
365-
366359 std::vector<uint8_t > l_binaryValue{};
367360
368361 if (i_value.substr (0 , 2 ).compare (" 0x" ) == constants::STR_CMP_SUCCESS)
369362 {
363+ if (i_value.length () % 2 != 0 )
364+ {
365+ throw std::runtime_error (
366+ " Write option accepts 2 digit hex numbers. (Ex. 0x1 "
367+ " should be given as 0x01)." );
368+ }
369+
370370 auto l_value = i_value.substr (2 );
371371
372372 if (l_value.empty ())
You can’t perform that action at this time.
0 commit comments