Better fix for parsing error.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4065 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1290,7 +1290,7 @@ public class ChatDirector extends BasicDirector
|
|||||||
*/
|
*/
|
||||||
protected String[] parseTell (String args)
|
protected String[] parseTell (String args)
|
||||||
{
|
{
|
||||||
String handle, message = null;
|
String handle, message;
|
||||||
if (args.startsWith("\"")) {
|
if (args.startsWith("\"")) {
|
||||||
int nextQuote = args.indexOf('"', 1);
|
int nextQuote = args.indexOf('"', 1);
|
||||||
if (nextQuote == -1 || nextQuote == 1) {
|
if (nextQuote == -1 || nextQuote == 1) {
|
||||||
@@ -1304,9 +1304,7 @@ public class ChatDirector extends BasicDirector
|
|||||||
} else {
|
} else {
|
||||||
StringTokenizer st = new StringTokenizer(args);
|
StringTokenizer st = new StringTokenizer(args);
|
||||||
handle = st.nextToken();
|
handle = st.nextToken();
|
||||||
if (handle.length() < args.length()) {
|
message = args.substring(handle.length()).trim();
|
||||||
message = args.substring(handle.length() + 1).trim();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new String[] { handle, message };
|
return new String[] { handle, message };
|
||||||
|
|||||||
Reference in New Issue
Block a user