Преглед изворни кода

zkas/decoder: Fix logic typo for section offset checks.

parazyd пре 4 година
родитељ
комит
534d918534
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      zkas/src/decoder.rs

+ 3 - 3
zkas/src/decoder.rs

@@ -42,15 +42,15 @@ impl ZkBinary {
             None => bytes.len(),
             None => bytes.len(),
         };
         };
 
 
-        if constants_offset < contract_offset {
+        if constants_offset > contract_offset {
             return Err(ZkasDecoderError(".contract appeared before .constant"))
             return Err(ZkasDecoderError(".contract appeared before .constant"))
         }
         }
 
 
-        if contract_offset < circuit_offset {
+        if contract_offset > circuit_offset {
             return Err(ZkasDecoderError(".contract appeared before .circuit"))
             return Err(ZkasDecoderError(".contract appeared before .circuit"))
         }
         }
 
 
-        if circuit_offset < debug_offset {
+        if circuit_offset > debug_offset {
             return Err(ZkasDecoderError(".circuit appeared before .debug or EOF"))
             return Err(ZkasDecoderError(".circuit appeared before .debug or EOF"))
         }
         }