Fix double-quoted strings in parameters

This commit is contained in:
Mike Primm 2011-09-06 02:35:12 +08:00 committed by mikeprimm
parent e86aa352df
commit f99700d863

View File

@ -438,13 +438,18 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener<DynmapWorld> {
sb.append(c);
}
}
else if(c == '\"') { /* Start of quote? */
inquote = true;
}
else if(c == ':') { /* var:value */
varid = sb.toString(); /* Save variable ID */
sb.setLength(0);
}
else if(c == ' ') { /* Ending space? */
if(varid == null) { /* No varid? */
rslt.put("label", sb.toString());
if(sb.length() > 0) {
rslt.put("label", sb.toString());
}
}
else {
rslt.put(varid, sb.toString());