summaryrefslogtreecommitdiff
path: root/idlc
diff options
context:
space:
mode:
Diffstat (limited to 'idlc')
-rw-r--r--idlc/source/astexpression.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx
index 3da8db708d78..f9b0f08f0534 100644
--- a/idlc/source/astexpression.cxx
+++ b/idlc/source/astexpression.cxx
@@ -892,7 +892,7 @@ coerce_value(AstExprValue *ev, ExprType t)
{
return false;
}
- auto tmp = static_cast<unsigned char>(ev->u.fval);
+ auto tmp = static_cast<unsigned char>(static_cast<sal_Int32>(ev->u.fval));
ev->u.byval = tmp;
ev->et = ET_byte;
return true;
@@ -904,7 +904,7 @@ coerce_value(AstExprValue *ev, ExprType t)
{
return false;
}
- auto tmp = static_cast<unsigned char>(ev->u.dval);
+ auto tmp = static_cast<unsigned char>(static_cast<sal_Int32>(ev->u.dval));
ev->u.byval = tmp;
ev->et = ET_byte;
return true;