summaryrefslogtreecommitdiff
path: root/TAO/tests/Param_Test/helper.cpp
diff options
context:
space:
mode:
authorPhil Mesnier <mesnier_p@ociweb.com>2003-04-02 03:48:09 +0000
committerPhil Mesnier <mesnier_p@ociweb.com>2003-04-02 03:48:09 +0000
commit92e19af312c2c807079ae56f01ad6d427c1ecdee (patch)
tree57fb5ba1f780e0999e9996198da6e682b262cad5 /TAO/tests/Param_Test/helper.cpp
parent922c0978a9fe3f8b0ae9c4cc4bc65d173b7dc583 (diff)
downloadATCD-92e19af312c2c807079ae56f01ad6d427c1ecdee.tar.gz
ChangeLog tag: Tue Apr 1 21:44:47 2003 Phil Mesnier <mesnier_p@ociweb.com>
Diffstat (limited to 'TAO/tests/Param_Test/helper.cpp')
-rw-r--r--TAO/tests/Param_Test/helper.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/TAO/tests/Param_Test/helper.cpp b/TAO/tests/Param_Test/helper.cpp
index 8719dee0790..544524a8263 100644
--- a/TAO/tests/Param_Test/helper.cpp
+++ b/TAO/tests/Param_Test/helper.cpp
@@ -82,10 +82,8 @@ Generator::gen_wstring (int max_length)
CORBA::ULong len = (CORBA::ULong) (::ACE_OS::rand () % max_length);
CORBA::WChar *buf = CORBA::wstring_alloc (len);
CORBA::ULong i = 0;
- CORBA::WChar limit = 1;
- for (i = ACE_OutputCDR::wchar_maxbytes(); i > 0; i--)
- limit *= 256;
-
+ CORBA::WChar limit =
+ ACE_OutputCDR::wchar_maxbytes() == 1 ? ACE_OCTET_MAX : ACE_WCHAR_MAX;
while (i < len)
{
CORBA::WChar wc = ACE_OS::rand () % limit;