]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - utf8lib.c
implemented music playlist system with 10 playlists, automatic track
[xonotic/darkplaces.git] / utf8lib.c
index f7dff508feedb1d0b8e2d564be1000342e835e87..151a1ca5b90f39b95bcdae64906c78597c341505 100644 (file)
--- a/utf8lib.c
+++ b/utf8lib.c
@@ -62,9 +62,8 @@ Uchar utf8_range[5] = {
 static qboolean u8_analyze(const char *_s, size_t *_start, size_t *_len, Uchar *_ch, size_t _maxlen)
 {
        const unsigned char *s = (const unsigned char*)_s;
-       unsigned char bt;//, bc;
-       size_t i;
-       size_t bits, j;
+       size_t i, j;
+       size_t bits = 0;
        Uchar ch;
 
        i = 0;
@@ -586,7 +585,7 @@ int u8_fromchar(Uchar w, char *to, size_t maxlen)
                to[3] = 0x80 | (w & 0x3F); w >>= 6;
                to[2] = 0x80 | (w & 0x3F); w >>= 6;
                to[1] = 0x80 | (w & 0x3F); w >>= 6;
-               to[0] = 0xE0 | w;
+               to[0] = 0xF0 | w;
                return 4;
        }
        return 0;