Software /
code /
prosody
Changeset
7998:604beb13596a
util.encodings: Make limit lookup table a const (from Lua f2a813ae)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 22 Mar 2017 23:40:53 +0100 |
parents | 7997:aca13c433e45 |
children | 7999:980606856882 8000:42dd766cfe97 |
files | util-src/encodings.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util-src/encodings.c Wed Mar 22 14:13:28 2017 +0100 +++ b/util-src/encodings.c Wed Mar 22 23:40:53 2017 +0100 @@ -173,7 +173,7 @@ * Decode one UTF-8 sequence, returning NULL if byte sequence is invalid. */ static const char *utf8_decode(const char *o, int *val) { - static unsigned int limits[] = {0xFF, 0x7F, 0x7FF, 0xFFFF}; + static const unsigned int limits[] = {0xFF, 0x7F, 0x7FF, 0xFFFF}; const unsigned char *s = (const unsigned char *)o; unsigned int c = s[0]; unsigned int res = 0; /* final result */