Skip to content

Commit

Permalink
Be more thrifty wrt code buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
lopex committed Mar 11, 2012
1 parent 4f705e9 commit 6407ffb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/org/joni/ArrayCompiler.java
Expand Up @@ -56,7 +56,8 @@ final class ArrayCompiler extends Compiler {

@Override
protected final void prepare() {
code = new int[(analyser.stop - analyser.p) * 2 + 1]; // (+1: empty regex)
int codeSize = Config.USE_STRING_TEMPLATES ? 8 : ((analyser.getEnd() - analyser.getBegin()) * 2 + 2);
code = new int[codeSize];
codeLength = 0;
}

Expand Down

0 comments on commit 6407ffb

Please sign in to comment.