Fix double-quoted strings in parameters

This commit is contained in:
Mike Primm 2011-09-05 13:35:12 -05:00
parent f950fb4d85
commit 270f64c594

View File

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