Proper fix for Condition bug
authorRichard Fairhurst <richard@systemeD.net>
Sun, 19 Jun 2011 11:01:18 +0000 (12:01 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Sun, 19 Jun 2011 11:01:18 +0000 (12:01 +0100)
net/systemeD/halcyon/styleparser/Condition.as

index 114d087..31c7f9e 100644 (file)
@@ -36,7 +36,7 @@ package net.systemeD.halcyon.styleparser {
                                case 'regex':   var r:RegExp=new RegExp(params[1],"i");
                                                                return (r.test(tags[params[0]])); break;
                                case 'true':    return (tags[params[0]]=='true' || tags[params[0]]=='yes' || tags[params[0]]=='1'); break;
-                               case 'false':   return (tags[params[0]]!='true' && tags[params[0]]!='yes' && tags[params[0]]!='1' && tags[params[0]]!=undefined && tags[params[0]]!=''); break;
+                               case 'false':   return (tags[params[0]]=='false' || tags[params[0]]=='no' || tags[params[0]]=='0'); break;
                                case 'set':             return (tags[params[0]]!=undefined && tags[params[0]]!=''); break;
                                case 'unset':   return (tags[params[0]]==undefined || tags[params[0]]==''); break;
                                case '<':               return (Number(tags[params[0]])< Number(params[1])); break;