bnagy / gapstone

gapstone is a Go binding for the capstone disassembly library
Other
151 stars 43 forks source link

fix 386 build #4

Closed ebfe closed 10 years ago

ebfe commented 10 years ago

Building gapstone on 386 currently fails with:

$ go build
# github.com/bnagy/gapstone
./test_resources.go:101: constant 2147483652 overflows int
./test_resources.go:122: constant 2147483648 overflows int
./test_resources.go:129: constant 2147483648 overflows int
./test_resources.go:180: constant 2147483652 overflows int
./test_resources.go:228: constant 2147483648 overflows int
./test_resources.go:228: too many errors

The problem is the definition of CS_MODE_BIG_ENDIAN (1 << 31) which doesn't fit into an signed 32-bit int. This pr changes the type of mode in (New() and Engine) to uint which fixed the build on 386 but unfortunately also changes the public API.

bnagy commented 10 years ago

fixed in next, thanks.