Branch: Tag:

2012-02-23

2012-02-23 17:45:02 by Henrik Grubbström (Grubba) <grubba@grubba.org>

utf8_to_string(): Fixed bug in the surrogate decoder.

2374:    if ((extended & 2) && (c & 0xfc00) == 0xdc00) {    /* Low surrogate */    c &= 0x3ff; -  c |= ((out_str[--j] & 0x3ff)<<10) | 0x10000; +  c |= ((out_str[--j] & 0x3ff)<<10) + 0x10000;    }    }    out_str[j++] = c;