projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57243b3
)
fix undefined left-shift of negative values in utf-8 state table
author
Rich Felker
<dalias@aerifal.cx>
Sat, 25 Jul 2015 03:15:45 +0000
(
03:15
+0000)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 25 Jul 2015 03:15:45 +0000
(
03:15
+0000)
src/multibyte/internal.h
patch
|
blob
|
history
diff --git
a/src/multibyte/internal.h
b/src/multibyte/internal.h
index 53d62edaffb9e1143a3f4a2aa34758b7e215ab01..51308f4f0cc14a4f0245a541010e2ff4ca22d712 100644
(file)
--- 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 ? 0x40
u-b : 0u
-a) << 23))
#define FAILSTATE R(0x80,0x80)
#define SA 0xc2u