diff --git a/libtcc.c b/libtcc.c index 6aa2afd0..64dae664 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1247,7 +1247,7 @@ ST_FUNC int set_flag(TCCState *s, const FlagDef *flags, const char *name) continue; } if (p->offset) { - *(int*)((char *)s + p->offset) = + *((unsigned char *)s + p->offset) = p->flags & FD_INVERT ? !value : value; if (ret) return 0; diff --git a/tcc.h b/tcc.h index cd35a1ab..b6a46069 100644 --- a/tcc.h +++ b/tcc.h @@ -731,7 +731,7 @@ struct TCCState { int seg_size; /* 32. Can be 16 with i386 assembler (.code16) */ #endif #ifdef TCC_TARGET_X86_64 - int nosse; /* For -mno-sse support. */ + unsigned char nosse; /* For -mno-sse support. */ #endif /* array of all loaded dlls (including those referenced by loaded dlls) */