diff options
author | Max Cai <maxtroy@google.com> | 2014-08-29 15:47:23 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-08-29 15:47:23 +0000 |
commit | bb80065a75206799123bde22fdd533dfe3392e52 (patch) | |
tree | a0a60e243d94cdf170426c4cfacb593f67a5ee84 | |
parent | d85ee8b8cda8cba35a28952f0de9186abc3422c5 (diff) | |
parent | 0068978c364173b15a9cb8ab65fb2d2eac17f136 (diff) | |
download | external_protobuf-bb80065a75206799123bde22fdd533dfe3392e52.zip external_protobuf-bb80065a75206799123bde22fdd533dfe3392e52.tar.gz external_protobuf-bb80065a75206799123bde22fdd533dfe3392e52.tar.bz2 |
am 0068978c: Merge "Fixed octal printing of bytearrays"
* commit '0068978c364173b15a9cb8ab65fb2d2eac17f136':
Fixed octal printing of bytearrays
-rw-r--r-- | java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java b/java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java index 572a707..4cca3d5 100644 --- a/java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java +++ b/java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java @@ -243,7 +243,7 @@ public final class MessageNanoPrinter { builder.append('"'); for (int i = 0; i < bytes.length; ++i) { - int ch = bytes[i]; + int ch = bytes[i] & 0xff; if (ch == '\\' || ch == '"') { builder.append('\\').append((char) ch); } else if (ch >= 32 && ch < 127) { |