Fix setting of options

now that the type of boolean options is uchar set_flag() needs
an accompanying change.
This commit is contained in:
Michael Matz 2019-12-05 17:04:04 +01:00
parent 1dc92f8ff8
commit 474f95dda8
2 changed files with 2 additions and 2 deletions

View File

@ -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;

2
tcc.h
View File

@ -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) */