Pārlūkot izejas kodu

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

parazyd 4 gadi atpakaļ
vecāks
revīzija
534d918534
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 3 3
      zkas/src/decoder.rs

+ 3 - 3
zkas/src/decoder.rs

@@ -42,15 +42,15 @@ impl ZkBinary {
             None => bytes.len(),
         };
 
-        if constants_offset < contract_offset {
+        if constants_offset > contract_offset {
             return Err(ZkasDecoderError(".contract appeared before .constant"))
         }
 
-        if contract_offset < circuit_offset {
+        if contract_offset > circuit_offset {
             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"))
         }