aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Cai <maxtroy@google.com>2015-03-20 23:15:13 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-20 23:15:13 +0000
commitbe3a18d1f871540519ac73efb4f420aef24a5be5 (patch)
treea0a60e243d94cdf170426c4cfacb593f67a5ee84
parente72726879fac0251b48f910b9ec5adf241c75a53 (diff)
parentbb80065a75206799123bde22fdd533dfe3392e52 (diff)
downloadexternal_protobuf-be3a18d1f871540519ac73efb4f420aef24a5be5.zip
external_protobuf-be3a18d1f871540519ac73efb4f420aef24a5be5.tar.gz
external_protobuf-be3a18d1f871540519ac73efb4f420aef24a5be5.tar.bz2
am bb80065a: am 0068978c: Merge "Fixed octal printing of bytearrays"
* commit 'bb80065a75206799123bde22fdd533dfe3392e52': Fixed octal printing of bytearrays
-rw-r--r--java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java2
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) {