summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Cai <maxtroy@google.com>2014-08-29 11:39:06 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-08-29 11:39:06 +0000
commita78c78688b1e79afc7cb67316ff7d104829d84fd (patch)
tree61428929b122eec23875400ddcf7b125c97255b6
parentbfe5b30ef488bbbfb3a52775d796d3b9e08e12c5 (diff)
parent238e0ac56654afadb5270264660db7305f139c02 (diff)
downloadexternal_protobuf-a78c78688b1e79afc7cb67316ff7d104829d84fd.zip
external_protobuf-a78c78688b1e79afc7cb67316ff7d104829d84fd.tar.gz
external_protobuf-a78c78688b1e79afc7cb67316ff7d104829d84fd.tar.bz2
am 238e0ac5: Merge "Fixed octal printing of bytearrays"
* commit '238e0ac56654afadb5270264660db7305f139c02': 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('"');