diff options
author | Linus Tufvesson <lus@google.com> | 2014-08-29 10:17:59 +0100 |
---|---|---|
committer | Linus Tufvesson <lus@google.com> | 2014-08-29 11:25:48 +0100 |
commit | f56bd09ac980fcde8b6af4e3fbd5bf9c97fc9199 (patch) | |
tree | a0a60e243d94cdf170426c4cfacb593f67a5ee84 /java | |
parent | 77866143340f7541180d91fa316071ce947b3a8d (diff) | |
download | external_protobuf-f56bd09ac980fcde8b6af4e3fbd5bf9c97fc9199.zip external_protobuf-f56bd09ac980fcde8b6af4e3fbd5bf9c97fc9199.tar.gz external_protobuf-f56bd09ac980fcde8b6af4e3fbd5bf9c97fc9199.tar.bz2 |
Fixed octal printing of bytearrays
- Now with 50% less '&' and 100% fewer build breakages!
Change-Id: Icf0283220f75cd14b8564b51bd55973e5b7da56b
Diffstat (limited to 'java')
-rw-r--r-- | java/src/main/java/com/google/protobuf/nano/MessageNanoPrinter.java | 2 |
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) { |