Corrected string->int conversion bug in TargetPinDescriptor.
The `numericPosition` member should really be removed. Will revisit later.
This commit is contained in:
@@ -9,7 +9,11 @@ namespace Targets
|
||||
const std::optional<std::string>& padKey
|
||||
)
|
||||
: position(position)
|
||||
, numericPosition(Services::StringService::toUint16(this->position, 10))
|
||||
, numericPosition(
|
||||
Services::StringService::isNumeric(this->position)
|
||||
? Services::StringService::toUint16(this->position, 10)
|
||||
: 0
|
||||
)
|
||||
, padKey(padKey)
|
||||
{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user