diff options
author | Rich Felker <dalias@aerifal.cx> | 2015-07-25 03:15:45 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2015-07-25 03:15:45 +0000 |
commit | fe7582f4f92152ab60e9523bf146fe28ceae51f6 (patch) | |
tree | 31da8c970cf126d12ad74d188dfe3557fb039c27 | |
parent | 57243b30214656e7dd9fff509a1b6370b712f863 (diff) | |
download | musl-fe7582f4f92152ab60e9523bf146fe28ceae51f6.tar.gz musl-fe7582f4f92152ab60e9523bf146fe28ceae51f6.tar.xz musl-fe7582f4f92152ab60e9523bf146fe28ceae51f6.zip |
fix undefined left-shift of negative values in utf-8 state table
-rw-r--r-- | src/multibyte/internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/multibyte/internal.h b/src/multibyte/internal.h index 53d62eda..51308f4f 100644 --- a/src/multibyte/internal.h +++ b/src/multibyte/internal.h @@ -18,7 +18,7 @@ extern const uint32_t bittab[]; #define OOB(c,b) (((((b)>>3)-0x10)|(((b)>>3)+((int32_t)(c)>>26))) & ~7) /* Interval [a,b). Either a must be 80 or b must be c0, lower 3 bits clear. */ -#define R(a,b) ((uint32_t)((a==0x80 ? 0x40-b : -a) << 23)) +#define R(a,b) ((uint32_t)((a==0x80 ? 0x40u-b : 0u-a) << 23)) #define FAILSTATE R(0x80,0x80) #define SA 0xc2u |