DNA Replicator Fix
gcewing on 2007/09/11 04:57
of 555-BOOM!
Here's a small patch to fix a problem causing DNA Replicator to crash on big-endian systems.
--- DNAReplicator-1.3-src/lib/main.py 2007-09-08 14:59:24.000000000 +1200
+++ DNAReplicator-1.3-src-patched/lib/main.py 2007-09-11 16:50:31.000000000 +1200
@@ -138,13 +138,13 @@
basedl = {}
for base in ('adenine','guanine','cytosine','thymine'):
a = array.array('f')
- if sys.byteorder == 'big':
- a.byteswap()
flo = open(data.filepath('%s.msh' % base),'rb')
try:
a.fromstring(flo.read())
finally:
flo.close()
+ if sys.byteorder == 'big':
+ a.byteswap()
basedl[base] = compilemesh(a)
global txfont