Fix flag values being loaded as strings

This commit is contained in:
MattBDev 2016-04-26 08:40:52 -04:00
parent d8849f718c
commit 2c16c767e7

View File

@ -1841,7 +1841,7 @@ public class SQLManager implements AbstractDB {
try { try {
String flag_str = split[1].replaceAll("\u00AF", ":").replaceAll("\u00B4", ","); String flag_str = split[1].replaceAll("\u00AF", ":").replaceAll("\u00B4", ",");
Flag<?> flag = FlagManager.getFlag(split[0]); Flag<?> flag = FlagManager.getFlag(split[0]);
flags.put(flag, flag_str); flags.put(flag, flag.parseValue(flag_str));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
exception = true; exception = true;
@ -1850,7 +1850,7 @@ public class SQLManager implements AbstractDB {
element = element.replaceAll("\u00AF", ":").replaceAll("\u00B4", ","); element = element.replaceAll("\u00AF", ":").replaceAll("\u00B4", ",");
if (StringMan.isAlpha(element.replaceAll("_", "").replaceAll("-", ""))) { if (StringMan.isAlpha(element.replaceAll("_", "").replaceAll("-", ""))) {
Flag flag = FlagManager.getFlag(element); Flag flag = FlagManager.getFlag(element);
flags.put(flag, ""); flags.put(flag, flag.parseValue(""));
} else { } else {
PS.debug("INVALID FLAG: " + element); PS.debug("INVALID FLAG: " + element);
} }