explicitly use integer division in python script. make minimize.sh script fail on errors, instead of silently ignoring them

This commit is contained in:
arvidn 2019-08-23 13:43:34 +02:00 committed by Arvid Norberg
parent baeb959054
commit 9b6d49d539
2 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#!/bin/bash
set -e
function minimize
{

View File

@ -138,7 +138,7 @@ for i in range(0, 1):
messages.append(add_extended_handshake(add_length(struct.pack('BBB', 20, 3, i))))
# bitfields
bitfield_len = (100 + 7)/8
bitfield_len = (100 + 7) // 8
for i in range(256):
messages.append(add_length(struct.pack('B', 5) + (chr(i) * bitfield_len)))