diff options
Diffstat (limited to 'unoidl')
-rw-r--r-- | unoidl/source/sourceprovider-parser.y | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y index 94573b1ea147..965a3b9b8c37 100644 --- a/unoidl/source/sourceprovider-parser.y +++ b/unoidl/source/sourceprovider-parser.y @@ -228,8 +228,11 @@ bool coerce( ok = true; break; case unoidl::detail::SourceProviderExpr::TYPE_FLOAT: - lhs->fval = lhs->uval; - ok = true; + { + auto nTmp = lhs->uval; + lhs->fval = nTmp; + ok = true; + } break; } break; @@ -239,12 +242,18 @@ bool coerce( ok = false; break; case unoidl::detail::SourceProviderExpr::TYPE_INT: - rhs->fval = rhs->ival; - ok = true; + { + auto tmp = rhs->ival; + rhs->fval = tmp; + ok = true; + } break; case unoidl::detail::SourceProviderExpr::TYPE_UINT: - rhs->fval = rhs->uval; - ok = true; + { + auto tmp = rhs->uval; + rhs->fval = tmp; + ok = true; + } break; case unoidl::detail::SourceProviderExpr::TYPE_FLOAT: ok = true; |