summaryrefslogtreecommitdiff
path: root/ACE/ace/ETCL
diff options
context:
space:
mode:
authorjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-09-19 17:55:23 +0000
committerjtc <jtc@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2008-09-19 17:55:23 +0000
commitb72b76f5a0e0d0f319219604817cffa0118da9ff (patch)
tree968c7709371a7217da75e73374e7b41734b6088a /ACE/ace/ETCL
parent1c65e787a578abc5c5925064387f95f03e9bc690 (diff)
downloadATCD-b72b76f5a0e0d0f319219604817cffa0118da9ff.tar.gz
ChangeLogTag: Fri Sep 19 17:51:12 UTC 2008 J.T. Conklin <jtc@acorntoolworks.com>
Diffstat (limited to 'ACE/ace/ETCL')
-rw-r--r--ACE/ace/ETCL/ETCL_Constraint.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/ACE/ace/ETCL/ETCL_Constraint.cpp b/ACE/ace/ETCL/ETCL_Constraint.cpp
index 2cb0d6c5a88..ee4662d1f2e 100644
--- a/ACE/ace/ETCL/ETCL_Constraint.cpp
+++ b/ACE/ace/ETCL/ETCL_Constraint.cpp
@@ -365,17 +365,26 @@ ETCL_Literal_Constraint::operator/ (const ETCL_Literal_Constraint & rhs)
{
case ACE_ETCL_DOUBLE:
{
+ if ((ACE_CDR::Double) rhs == 0.0)
+ return ETCL_Literal_Constraint ((ACE_CDR::Double) 0.0);
+
ACE_CDR::Double result = (ACE_CDR::Double) *this / (ACE_CDR::Double) rhs;
return ETCL_Literal_Constraint ((ACE_CDR::Double) result);
}
case ACE_ETCL_INTEGER:
case ACE_ETCL_SIGNED:
{
+ if ((ACE_CDR::Long) rhs == 0)
+ return ETCL_Literal_Constraint ((ACE_CDR::Long) 0);
+
ACE_CDR::Long result = (ACE_CDR::Long) *this / (ACE_CDR::Long) rhs;
return ETCL_Literal_Constraint ((ACE_CDR::Long) result);
}
case ACE_ETCL_UNSIGNED:
{
+ if ((ACE_CDR::ULong) rhs == 0)
+ return ETCL_Literal_Constraint ((ACE_CDR::ULong) 0);
+
ACE_CDR::ULong result = (ACE_CDR::ULong) *this / (ACE_CDR::ULong) rhs;
return ETCL_Literal_Constraint ((ACE_CDR::ULong) result);
}