summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorLinus Tufvesson <lus@google.com>2014-08-28 16:11:00 +0100
committerLinus Tufvesson <lus@google.com>2014-08-28 16:20:02 +0100
commit8b8481868877c9db407d04bdf4843e50d8920806 (patch)
tree61428929b122eec23875400ddcf7b125c97255b6 /java
parenta76831c3629c3c1a9900984f3aea6306dbf0734c (diff)
downloadexternal_protobuf-8b8481868877c9db407d04bdf4843e50d8920806.zip
external_protobuf-8b8481868877c9db407d04bdf4843e50d8920806.tar.gz
external_protobuf-8b8481868877c9db407d04bdf4843e50d8920806.tar.bz2
Fixed octal printing of bytearrays
Change-Id: Ia848d7fae9aeab89e65b00f05cee6c1e6d649d94
Diffstat (limited to 'java')
-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('"');