First post, by cyfin
- Rank
- Newbie
I was having trouble running DOSBox 0.61 on my GNU Linux x86_64 ( custom built distribution). I did some gdb-ing and found it was SEG Faulting in /src/gui/render_templates.h line 13: "case 32:*(Bit32u*)dst=val;dst+=4;break;"
Problem is Bit32u is not 32 bits. Therefore adding 4 is wrong. (maybe adding by sizeof(Bit32u) would be better/safer?)
In include/dosbox.h you define bit32u as "typedef unsigned long Bit32u;"
On a 64 bit system, unsinged long is 64 bits. to fix this, I used
#include <stdint.h>
typedef uint8_t Bit8u;
typedef int8_t Bit8s;
typedef uint16_t Bit16u;
typedef int16_t Bit16s;
typedef uint32_t Bit32u;
typedef int32_t Bit32s;
I'm no expert, but this got it all working fine for me. I'm not sure about its portability though. Hope this helps