|
From: <cn...@us...> - 2020-07-15 17:14:43
|
Revision: 1038
http://sourceforge.net/p/seq/svn/1038
Author: cn187
Date: 2020-07-15 17:14:41 +0000 (Wed, 15 Jul 2020)
Log Message:
-----------
Mofidy update_zoneopcodes.py to replace unfound opcodes with ffff in order to avoid accidental collisions
Modified Paths:
--------------
showeq/trunk/scripts/update_zoneopcodes.py
Modified: showeq/trunk/scripts/update_zoneopcodes.py
===================================================================
--- showeq/trunk/scripts/update_zoneopcodes.py 2020-06-18 17:42:17 UTC (rev 1037)
+++ showeq/trunk/scripts/update_zoneopcodes.py 2020-07-15 17:14:41 UTC (rev 1038)
@@ -94,10 +94,6 @@
opname = match.group(2)
update = match.group(3)
- if opname not in opcodes:
- outfile.write(line)
- continue
-
opcode_start = match.start(1)
opcode_end = match.end(1)
@@ -107,8 +103,13 @@
date_start = match.start(3)
date_end = match.end(3)
- new_line = line[:opcode_start] + opcodes[opname]
- new_line += line[opcode_end:date_start] + new_date + line[date_end:]
+ new_line = line[:opcode_start]
+ if opname not in opcodes:
+ new_line += 'ffff'
+ new_line += line[opcode_end:]
+ else:
+ new_line += opcodes[opname]
+ new_line += line[opcode_end:date_start] + new_date + line[date_end:]
outfile.write(new_line)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|