Skip to content

Commit

Permalink
Merge branch 'master' of github.com:antlr/antlr4
Browse files Browse the repository at this point in the history
  • Loading branch information
parrt committed Dec 17, 2018
2 parents 4ccf715 + d7e0f4b commit 9f6dfb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions contributors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ YYYY/MM/DD, github id, Full name, email
2018/02/11, io7m, Mark Raynsford, [email protected]
2018/04/24, solussd, Joe Smith, [email protected]
2018/15/05, johnvanderholt, jan dillingh [email protected]
2018/06/14, scadgek, Sergey Chupov, [email protected]
2018/06/16, EternalPhane, Zongyuan Zuo, [email protected]
2018/06/27, wu-sheng, Wu Sheng, [email protected]
2018/02/25, chaseoxide, Marcus Ong, taccs97[at]gmail[dot]com
Expand All @@ -202,10 +203,10 @@ YYYY/MM/DD, github id, Full name, email
2018/06/16, EternalPhane, Zongyuan Zuo, [email protected]
2018/07/03, jgoppert, James Goppert, [email protected]
2018/07/27, Maksim Novikov, [email protected]
2018/07/31 Lucas Henrqiue, [email protected]
2018/07/31, Lucas Henrqiue, [email protected]
2018/08/03, ENDOH takanao, [email protected]
2018/10/29, chrisaycock, Christopher Aycock, chris[at]chrisaycock[dot]com
2018/11/12, vinoski, Steve Vinoski, [email protected]
2018/11/14, nxtstep, Adriaan (Arjan) Duz, codewithadriaan[et]gmail[dot]com
2018/11/15, amykyta3, Alex Mykyta, [email protected]
2018/11/29, hannemann-tamas, Ralf Hannemann-Tamas, [email protected]
2018/11/29, hannemann-tamas, Ralf Hannemann-Tamas, [email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ private CodePoint16BitCharStream(int position, int remaining, String name, char[
/** Return the UTF-16 encoded string for the given interval */
@Override
public String getText(Interval interval) {
int startIdx = Math.min(interval.a, size - 1);
int len = Math.min(interval.b - interval.a + 1, size);
int startIdx = Math.min(interval.a, size);
int len = Math.min(interval.b - interval.a + 1, size - startIdx);

// We know there are no surrogates in this
// array, since otherwise we would be given a
Expand Down Expand Up @@ -258,8 +258,8 @@ private CodePoint32BitCharStream(int position, int remaining, String name, int[]
/** Return the UTF-16 encoded string for the given interval */
@Override
public String getText(Interval interval) {
int startIdx = Math.min(interval.a, size - 1);
int len = Math.min(interval.b - interval.a + 1, size);
int startIdx = Math.min(interval.a, size);
int len = Math.min(interval.b - interval.a + 1, size - startIdx);

// Note that we pass the int[] code points to the String constructor --
// this is supported, and the constructor will convert to UTF-16 internally.
Expand Down

0 comments on commit 9f6dfb1

Please sign in to comment.