[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] Crash during play
From: |
Nardy Pillards |
Subject: |
Re: [Bug-gnubg] Crash during play |
Date: |
Fri, 29 Nov 2002 17:12:08 +0100 |
(jim)
>
> I've got a bad feeling about this:
> I assume, again, I haven't looked deeply into the code, that gnubg
> either doesn't use the first 40 entries of the database, which appear
> to be filled with an ID string. But...
>
> Under Unix we have:
>
> static unsigned char acBearoff1[] = {
> 0x67, 0x6E, 0x75, 0x62, 0x67, 0x2D, 0x4F, 0x53,
> 0x2D, 0x30, 0x36, 0x2D, 0x31, 0x35, 0x2D, 0x31,
> 0x2D, 0x31, 0x2D, 0x30, 0x78, 0x78, 0x78, 0x78,
> 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
> 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x0A,
> 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
>
> Which is 'GNUBG-OS-06-15-1-1-0xxxxxxxxxxxxxxxxxxx\n'
>
> And the Windows version has:
> static unsigned char acBearoff1[] = {
> 0x67, 0x6E, 0x75, 0x62, 0x67, 0x2D, 0x4F, 0x53,
> 0x2D, 0x30, 0x36, 0x2D, 0x31, 0x35, 0x2D, 0x31,
> 0x2D, 0x31, 0x2D, 0x30, 0x78, 0x78, 0x78, 0x78,
> 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78,
> 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x78, 0x0D,
> 0x0A, ...
>
> Note the extra \r in this output, which will move the whole database
> off by one byte. This will also kill every other occurence of 0x0a
> everywhere in the database (15432 times). I suspect this is not
> desireable behaviour.
>
> makebearoff attempts to avoid this by trying to fdopen stdout in rb
> mode, but it appears this isn't working. I've checked in a version of
> makebearoff which adds a -f <filename> option. This will be opened in
> "rb" mode, so it should produce UNIX line endings under Windows. The
> makefile line
>
> makebearoff -o 6 -s 7999999 > temp.bd
>
> should become
>
> makebearoff -o 6 -s 7999999 -f temp.bd
>
> When run, the start of br1.c should look like the Unix version - the
> 6th line of the array should start with 0x00, not 0x0A.
Yes, br1.c gives the expected content now.
Compiling gnubg.exe now
(I also generated a new gnubg_ts0.bd with -f option)
Nardy
- Re: [Bug-gnubg] Crash during play, (continued)
- Re: [Bug-gnubg] Crash during play, Nardy Pillards, 2002/11/29
- Re: [Bug-gnubg] Crash during play, Joern Thyssen, 2002/11/29
- Re: [Bug-gnubg] Crash during play, Jim Segrave, 2002/11/29
- Re: [Bug-gnubg] Crash during play, Nardy Pillards, 2002/11/29
- Re: [Bug-gnubg] Crash during play, Holger, 2002/11/29
- Re: [Bug-gnubg] Crash during play, Nardy Pillards, 2002/11/29
- Re: [Bug-gnubg] Crash during play, Jim Segrave, 2002/11/29
- Re: [Bug-gnubg] Crash during play, Nardy Pillards, 2002/11/29
- Re: [Bug-gnubg] Crash during play, Jim Segrave, 2002/11/29
- Re: [Bug-gnubg] Crash during play, Joern Thyssen, 2002/11/29
- Re: [Bug-gnubg] Crash during play,
Nardy Pillards <=
- Re: [Bug-gnubg] Crash during play, Nardy Pillards, 2002/11/29