Changeset 5701 in josm for trunk/src


Ignore:
Timestamp:
2013-02-08T21:58:21+01:00 (11 years ago)
Author:
bastiK
Message:

mapcss: small change in regexp expression function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Expression.java

    r5699 r5701  
    313313                Matcher m = Pattern.compile(pattern, f).matcher(target);
    314314                if (m.matches()) {
    315                     List result = new ArrayList(m.groupCount());
    316                     for (int i=1; i<=m.groupCount(); i++) {
     315                    List result = new ArrayList(m.groupCount() + 1);
     316                    for (int i=0; i<=m.groupCount(); i++) {
    317317                        result.add(m.group(i));
    318318                    }
     
    325325                Matcher m = Pattern.compile(pattern).matcher(target);
    326326                if (m.matches()) {
    327                     List result = new ArrayList(m.groupCount());
    328                     for (int i=1; i<=m.groupCount(); i++) {
     327                    List result = new ArrayList(m.groupCount() + 1);
     328                    for (int i=0; i<=m.groupCount(); i++) {
    329329                        result.add(m.group(i));
    330330                    }
Note: See TracChangeset for help on using the changeset viewer.