From 4d64b8c9ad14ca2916a49be3e8f6ba2d5d697840 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Mon, 8 Apr 2024 17:43:49 -0500 Subject: [PATCH] config_passthrough.cpp --- src/config_passthrough.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/config_passthrough.cpp b/src/config_passthrough.cpp index dacdfb4c..0203d637 100644 --- a/src/config_passthrough.cpp +++ b/src/config_passthrough.cpp @@ -31,7 +31,12 @@ template<> int Passthrough::from_string(const std::string &s_) { - _data = PassthroughEnum::_from_string_nothrow(s_); + auto x = PassthroughEnum::_from_string_nothrow(s_); + + if(!x) + return -EINVAL; + + _data = x; return 0; }