Fixed octal printing of bytearrays

Change-Id: Ia848d7fae9aeab89e65b00f05cee6c1e6d649d94
pull/91/head
Linus Tufvesson 10 years ago
parent ec0e1c00e0
commit 32a45d0921
  1. 2
      java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java

@ -249,7 +249,7 @@ public final class MessageNanoPrinter {
} else if (ch >= 32 && ch < 127) { } else if (ch >= 32 && ch < 127) {
builder.append((char) ch); builder.append((char) ch);
} else { } else {
builder.append(String.format("\\%03o", ch)); builder.append(String.format("\\%03o", ch && 0xff));
} }
} }
builder.append('"'); builder.append('"');

Loading…
Cancel
Save