Skip to content

Commit d382cae

Browse files
committed
fix bug
1 parent d0bd3fe commit d382cae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/behaviortree_cpp/scripting/operators.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ struct ExprAssignment : ExprBase
381381
{
382382
// special case first: string to other type
383383
// check if we can use the StringConverter
384-
if(value.isString() && !any_ptr->isString())
384+
if(value.isString() && !any_ptr->empty() && !any_ptr->isString())
385385
{
386386
auto const str = value.cast<std::string>();
387387
if(auto converter = env.vars->portInfo(key)->converter())

0 commit comments

Comments
 (0)