Skip to content

Commit 91e62eb

Browse files
Fixed Device name formatting shows null characters (#217)
#216
1 parent 2ec7bf6 commit 91e62eb

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/methods.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,8 @@ auto device_name_from_nde(NeoDeviceEx* nde) -> std::string
657657
icsneoGetDeviceName(const_cast<NeoDeviceEx*>(nde), &name[0], name.capacity(), EDevNameTypeNoSerial);
658658
length == 0) {
659659
return std::string("icsneoGetDeviceName() Failed");
660+
} else {
661+
name.resize(length, '\0');
660662
}
661663
return name;
662664
} catch (ice::Exception&) {

0 commit comments

Comments
 (0)