diff options
author | José Fonseca <jfonseca@vmware.com> | 2014-05-13 17:36:42 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2014-05-13 17:36:42 +0100 |
commit | fbab35d24eb09b51074fdac51a7194dc5759d6a0 (patch) | |
tree | 90b22784cb5f4a05f2ac257014d9c9868ad7364f /cli | |
parent | aec30834bc234ec2a22ac90251ecd95e1cbed001 (diff) |
cli: Fix operation order.
I don't suppose this gets much testing, as long negative integers are
probably rare.
Warned by MSVC.
Diffstat (limited to 'cli')
-rw-r--r-- | cli/pickle.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/pickle.hpp b/cli/pickle.hpp index 84b643a9..59af6a7b 100644 --- a/cli/pickle.hpp +++ b/cli/pickle.hpp @@ -309,11 +309,13 @@ protected: sign = 0; } + // Count how many bytes we need to represent the long integer. T sl = l; unsigned c = 0; do { ++c; - } while (sl >>= 8 != sign); + sl >>= 8; + } while (sl != sign); // Add an extra byte if sign bit doesn't match if (((l >> (8 * c - 1)) & 1) != ((l >> (8 * sizeof l - 1)) & 1)) { |