From 270f64c594575f8d57c0151892b3dbb4e0abc300 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Mon, 5 Sep 2011 13:35:12 -0500 Subject: [PATCH] Fix double-quoted strings in parameters --- src/main/java/org/dynmap/markers/impl/MarkerAPIImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/dynmap/markers/impl/MarkerAPIImpl.java b/src/main/java/org/dynmap/markers/impl/MarkerAPIImpl.java index ec655dcb..ac179fe2 100644 --- a/src/main/java/org/dynmap/markers/impl/MarkerAPIImpl.java +++ b/src/main/java/org/dynmap/markers/impl/MarkerAPIImpl.java @@ -438,13 +438,18 @@ public class MarkerAPIImpl implements MarkerAPI, Event.Listener { 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());