summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Cai <maxtroy@google.com>2015-03-20 23:15:11 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-20 23:15:11 +0000
commitb90a9c5e0e63897713837b067d92e61cbd24677c (patch)
tree61428929b122eec23875400ddcf7b125c97255b6
parentdd45d773be68e4237cf059d1a87fdaf45a951f88 (diff)
parenta78c78688b1e79afc7cb67316ff7d104829d84fd (diff)
downloadexternal_protobuf-b90a9c5e0e63897713837b067d92e61cbd24677c.zip
external_protobuf-b90a9c5e0e63897713837b067d92e61cbd24677c.tar.gz
external_protobuf-b90a9c5e0e63897713837b067d92e61cbd24677c.tar.bz2
am a78c7868: am 238e0ac5: Merge "Fixed octal printing of bytearrays"
* commit 'a78c78688b1e79afc7cb67316ff7d104829d84fd': 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..ec12c7d 100644
--- a/java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java
+++ b/java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java
@@ -249,7 +249,7 @@ public final class MessageNanoPrinter {
} else if (ch >= 32 && ch < 127) {
builder.append((char) ch);
} else {
- builder.append(String.format("\\%03o", ch));
+ builder.append(String.format("\\%03o", ch && 0xff));
}
}
builder.append('"');