Mercurial > hg > monetdb-java
changeset 398:57663e5924f4 embedded
Small cleanup
author | Pedro Ferreira <pedro.ferreira@monetdbsolutions.com> |
---|---|
date | Wed, 02 Dec 2020 11:00:08 +0100 (2020-12-02) |
parents | d6792323e680 |
children | 1d10d4759108 |
files | src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiTupleLineParser.java |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiTupleLineParser.java +++ b/src/main/java/nl/cwi/monetdb/mcl/protocol/oldmapi/OldMapiTupleLineParser.java @@ -130,7 +130,9 @@ final class OldMapiTupleLineParser { case '0': case '1': case '2': case '3': // this could be an octal number, let's check it out if (pos + 2 < endpos) { - if (pos + 2 < i - 2 && array[pos + 1] >= '0' && array[pos + 1] <= '7' && array[pos + 2] >= '0' && array[pos + 2] <= '7') { + char chr2 = array[pos + 1]; + char chr3 = array[pos + 2]; + if (chr2 >= '0' && chr2 <= '7' && chr3 >= '0' && chr3 <= '7') { // we got an octal number between \000 and \377 try { tupleLineBuffer.put((char)(Integer.parseInt("" + array[pos] + array[pos + 1] + array[pos + 2], 8)));