diff options
Diffstat (limited to 'common/src')
-rw-r--r-- | common/src/com/android/utils/PositionXmlParser.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/src/com/android/utils/PositionXmlParser.java b/common/src/com/android/utils/PositionXmlParser.java index 1eae641..73574d5 100644 --- a/common/src/com/android/utils/PositionXmlParser.java +++ b/common/src/com/android/utils/PositionXmlParser.java @@ -208,7 +208,7 @@ public class PositionXmlParser { int prologueStart = -1; for (int lineEnd = offset; lineEnd < data.length; lineEnd++) { if (data[lineEnd] == 0) { - if ((lineEnd - offset) % 1 == 0) { + if ((lineEnd - offset) % 2 == 0) { seenEvenZero = true; } else { seenOddZero = true; @@ -255,7 +255,7 @@ public class PositionXmlParser { // No prologue on the first line, and no byte order mark: Assume UTF-8/16 if (charset == null) { - charset = seenOddZero ? UTF_16 : seenEvenZero ? UTF_16LE : UTF_8; + charset = seenOddZero ? UTF_16LE : seenEvenZero ? UTF_16 : UTF_8; } String xml = null; |