Przeglądaj źródła

zkas/parser: Fix logic bug in check_section_structure().

parazyd 4 lat temu
rodzic
commit
2cdb452987
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      zkas/src/parser.rs

+ 2 - 2
zkas/src/parser.rs

@@ -318,8 +318,8 @@ impl Parser {
             );
         }
 
-        if section == "constant" ||
-            section == "contract" && tokens[2..tokens.len() - 1].len() % 3 != 0
+        if (section == "constant" || section == "contract") &&
+            tokens[2..tokens.len() - 1].len() % 3 != 0
         {
             self.error(
                 format!(