mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-09-23 02:23:47 +08:00
Fixed string argument for soe_write.
This commit is contained in:
@@ -120,14 +120,14 @@ void CommandSoeWrite::execute(const StringVector &args)
|
||||
memSize = dataType->byteSize;
|
||||
} else {
|
||||
// guess string type size
|
||||
memSize = args[1].size();
|
||||
memSize = args[1].size() + 1;
|
||||
if (!memSize) {
|
||||
err << "Empty argument not allowed.";
|
||||
throwInvalidUsageException(err);
|
||||
}
|
||||
}
|
||||
|
||||
ioctl.data = new uint8_t[memSize + 1];
|
||||
ioctl.data = new uint8_t[memSize];
|
||||
|
||||
try {
|
||||
ioctl.data_size = interpretAsType(
|
||||
|
||||
Reference in New Issue
Block a user