Fixed MPString#toJson and added test

This commit is contained in:
2017-02-01 08:13:47 +01:00
parent bc1ed4fe3c
commit 4505c5b22c
2 changed files with 11 additions and 1 deletions

View File

@ -147,7 +147,7 @@ public class MPString implements MPType<String>, CharSequence {
if (c < ' ') {
result.append("\\u");
String hex = Integer.toHexString(c);
for (int j = 0; j - hex.length() < 4; j++) {
for (int j = 0; j + hex.length() < 4; j++) {
result.append('0');
}
result.append(hex);