mirror of
https://github.com/0intro/conterm
synced 2024-11-21 13:21:50 +03:00
include: fix sign extension in GBIT64
It fixes the "negative i/o offset" error that happens when doing i/o on files larger than 2 GB.
This commit is contained in:
parent
19a5046403
commit
f58b31b7fb
@ -37,7 +37,7 @@ struct Fcall
|
||||
#define GBIT8(p) ((p)[0])
|
||||
#define GBIT16(p) ((p)[0]|((p)[1]<<8))
|
||||
#define GBIT32(p) ((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24))
|
||||
#define GBIT64(p) ((vlong)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24)) |\
|
||||
#define GBIT64(p) ((u32int)((p)[0]|((p)[1]<<8)|((p)[2]<<16)|((p)[3]<<24)) |\
|
||||
((vlong)((p)[4]|((p)[5]<<8)|((p)[6]<<16)|((p)[7]<<24)) << 32))
|
||||
|
||||
#define PBIT8(p,v) (p)[0]=(v)
|
||||
|
Loading…
Reference in New Issue
Block a user