diff options
author | Barnabás Pőcze <barnabas.pocze@ideasonboard.com> | 2025-04-22 12:27:06 +0200 |
---|---|---|
committer | Barnabás Pőcze <barnabas.pocze@ideasonboard.com> | 2025-05-22 13:16:07 +0200 |
commit | 702af1a1d0974a70d5a603e1ed84acd281fa36e4 (patch) | |
tree | 357f6017340b35599ded81655c2870a8d5bd5168 /src/apps/cam/capture_script.cpp | |
parent | ffcecda4d5b9b5d17e3a99e07033321186f25a63 (diff) |
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: b35f04b3c194 ("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>
Diffstat (limited to 'src/apps/cam/capture_script.cpp')
-rw-r--r-- | src/apps/cam/capture_script.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/apps/cam/capture_script.cpp b/src/apps/cam/capture_script.cpp index e7e69960..fdf82efc 100644 --- a/src/apps/cam/capture_script.cpp +++ b/src/apps/cam/capture_script.cpp @@ -578,10 +578,6 @@ ControlValue CaptureScript::parseArrayControl(const ControlId *id, value = Span<const float>(values.data(), values.size()); break; } - case ControlTypeString: { - value = Span<const std::string>(repr.data(), repr.size()); - break; - } default: std::cerr << "Unsupported control type" << std::endl; break; |