[chirp_devel] [PATCH] fix bitdiff offset wrong by one #1259

Jens Jensen
Sun Jan 5 10:18:05 PST 2014


# HG changeset patch
# User Jens Jensen <kd4tjx at yahoo.com>
# Date 1388945776 21600
#      Sun Jan 05 12:16:16 2014 -0600
# Node ID 3c9f030bbf7e4c6686a30bcc65fd4c11963f1eb6
# Parent  e1eb3f50c25b791a9e4bdfc0b79372665814cb6c
fix bitdiff offset wrong by one #1259

diff -r e1eb3f50c25b -r 3c9f030bbf7e tools/bitdiff.py
--- a/tools/bitdiff.py	Sat Jan 04 09:31:03 2014 -0800
+++ b/tools/bitdiff.py	Sun Jan 05 12:16:16 2014 -0600
@@ -36,6 +36,7 @@
 	f2.seek(args.offset)
 	
 	while True:
+		pos = f1.tell() - args.offset
 		c1 = f1.read(1)
 		c2 = f2.read(1)
 		if not (c1 and c2):
@@ -43,7 +44,6 @@
 		b1 = ord(c1)
 		b2 = ord(c2)
 		if b1 != b2:
-			pos = f1.tell() - args.offset
 			printDiff(pos, b1, b2, args)
 	
 	pos = f1.tell() - args.offset



More information about the chirp_devel mailing list