Browse Source

Fix weird behaviour in CommandArguments

Change-Id: I82691ba13fe290804589ca84fde855194b5b75b8
Reviewed-on: http://gerrit.dmdirc.com/926
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
tags/0.6.3rc1
Chris Smith 14 years ago
parent
commit
154d3c0a59
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/com/dmdirc/commandparser/CommandArguments.java

+ 2
- 2
src/com/dmdirc/commandparser/CommandArguments.java View File

176
     public String getWordsAsString(final int start, final int end) {
176
     public String getWordsAsString(final int start, final int end) {
177
         Logger.assertTrue(start <= end + 1);
177
         Logger.assertTrue(start <= end + 1);
178
 
178
 
179
-        final Pattern pattern = Pattern.compile("(\\S+\\s*){" + (start) + "}"
180
-                + "((\\S+\\s*){" + Math.max(0, end - start) + "}\\S+).*?");
179
+        final Pattern pattern = Pattern.compile("(\\S+\\s+){" + (start) + "}"
180
+                + "((\\S+\\s+){" + Math.max(0, end - start) + "}\\S+).*?");
181
         final Matcher matcher = pattern.matcher(line);
181
         final Matcher matcher = pattern.matcher(line);
182
 
182
 
183
         return matcher.matches() ? matcher.group(2) : "";
183
         return matcher.matches() ? matcher.group(2) : "";

Loading…
Cancel
Save