Hello,

I played what if a bit, and tried adding some safety checks to the
backtrace location in campaign_lib.py:
  
def tohex(r,g,b):
        def bytehex(num):
                if num < 0:
                        import sys
                        print >>sys.stderr, "OVERRIDE", num, "with 0"
                        num = 0
                if num > 255:
                        import sys
                        print >>sys.stderr, "OVERRIDE", num, "with 255"
                        num = 255
                def bytehex2(num):
                        if num<10:
                                return chr(num+ord('0'))
                        else:
                                return chr(num+ord('a')-10)
                return bytehex2(num/16)+bytehex2(num%16)
        return '#'+bytehex(int(r*255))+bytehex(int(g*255))+bytehex(int(b*255))

This is what I got in the logs:

[...]
neutral_meson.png, not found
xyzwupgrading dodo.blank dumbfire_3pack_ammo 1 1 true
upgrading dodo.blank swarm_3pack_ammo 2 2 true
dot 0.956419xyzwxyzwxyzwxyzwOVERRIDE -636475304764 with 0
OVERRIDE -1900922166538 with 0
OVERRIDE -636475304764 with 0
OVERRIDE -1900922166538 with 0
OVERRIDE -636475304764 with 0
OVERRIDE -1900922166538 with 0
OVERRIDE -636475304764 with 0
OVERRIDE -1900922166538 with 0
OVERRIDE -2046153245590 with 0
xyzwSITUATION IS 1force change 0 bool False
peace
 adding 5 of Coffee cargo for 1.20449195996
 decrementing bounty to 1
reading company names 
generating cargo briefing
reading company names 
generating cargo briefing
[...]

With that patch it also doesn't crash anymore after landing from a
mission; I'm not however proposing the patch as a solution, as those
ugly values are surely coming from someplace broken.

I can't help noticing that both me and the other submitter are on amd64.


Ciao,

Enrico

-- 
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Pkg-games-devel mailing list
Pkg-games-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-devel

Reply via email to