Просмотр исходного кода

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

parazyd 4 лет назад
Родитель
Сommit
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(),
         };
 
-        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"))
         }