apps: cam: capture_script: Disallow arrays of strings
The current `ControlValue` mechanism does not support arrays
of strings, the assignment in the removed snippet will in fact
trigger an assertion failure in `ControlValue::set()` because
`sizeof(std::string) != ControlValueSize[ControlTypeString]`.
Fixes: b35f04b3c1
("cam: capture_script: Support parsing array controls")
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
parent
ffcecda4d5
commit
702af1a1d0
1 changed files with 0 additions and 4 deletions
|
@ -578,10 +578,6 @@ ControlValue CaptureScript::parseArrayControl(const ControlId *id,
|
||||||
value = Span<const float>(values.data(), values.size());
|
value = Span<const float>(values.data(), values.size());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ControlTypeString: {
|
|
||||||
value = Span<const std::string>(repr.data(), repr.size());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
std::cerr << "Unsupported control type" << std::endl;
|
std::cerr << "Unsupported control type" << std::endl;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue