diff options
author | Bernard Normier <bernard@zeroc.com> | 2014-07-28 16:53:43 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2014-07-28 16:53:43 -0400 |
commit | bf89a1b51b56231fddb9939596a39b5c7d86a1e0 (patch) | |
tree | 43698ed84b34b7bb4f54d33b398b063220715872 /cpp/test | |
parent | Correct __declspec for MinGW (diff) | |
download | ice-bf89a1b51b56231fddb9939596a39b5c7d86a1e0.tar.bz2 ice-bf89a1b51b56231fddb9939596a39b5c7d86a1e0.tar.xz ice-bf89a1b51b56231fddb9939596a39b5c7d86a1e0.zip |
Fixed ICE-5598 (generateRandom) and ICE-5520 (removed openssl/patch.mingw)
Diffstat (limited to 'cpp/test')
-rw-r--r-- | cpp/test/IceUtil/uuid/Client.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cpp/test/IceUtil/uuid/Client.cpp b/cpp/test/IceUtil/uuid/Client.cpp index eed9061fce7..07b7a806868 100644 --- a/cpp/test/IceUtil/uuid/Client.cpp +++ b/cpp/test/IceUtil/uuid/Client.cpp @@ -109,13 +109,14 @@ struct GenerateRandomString operator()() { string s; - s.resize(20); - char buf[20]; - IceUtilInternal::generateRandom(buf, static_cast<int>(sizeof(buf))); + s.resize(21); + char buf[21]; + IceUtilInternal::generateRandom(buf, sizeof(buf)); for(unsigned int i = 0; i < sizeof(buf); ++i) { - s[i] = 33 + buf[i] % (127-33); // We use ASCII 33-126 (from ! to ~, w/o space). + s[i] = 33 + static_cast<unsigned char>(buf[i]) % (127 - 33); // We use ASCII 33-126 (from ! to ~, w/o space). } + // cerr << s << endl; return s; } }; |