https://projects.qnetp.net/
2014-12-23T17:40:20+01:00
Projects hosted by qNETp
Smuxi - Bug #1006: OverflowException in agsXMPP.Xml.Xpnet.Encoding.setCharType()
https://projects.qnetp.net/issues/show/1006?journal_id=2611
2014-12-23T17:40:20+01:00
Mirco Bauer
<ul></ul><pre>
private static void setCharType(char min, char max, int type)
{
int[] shared = null;
do
{
if ((min & 0xFF) == 0)
{
for (; min + (char)0xFF <= max; min += (char)0x100)
{
if (shared == null)
{
shared = new int[256];
for (int i = 0; i < 256; i++)
shared[i] = type;
}
charTypeTable[min >> 8] = shared;
if (min + 0xFF == max)
return;
}
}
setCharType(min, type);
} while (min++ != max);
}
</pre>