MultiByte Unselialize BUG
Brought to you by:
sephiroth_tmm
I corrected trouble in the part where the character of MultiByte was processed.
for Ver 2.1.6
line 241~
OLD:
for (i = 0; i < j; i++){
if ((cstr.charCodeAt (i + startIndex) > 128) && (cstr.charCodeAt (i + startIndex) < 2048)){
j = j - 1
}
}
NEW:
for (i = 0; i < j; i++){
if ((cstr.charCodeAt (i + startIndex) > 128) && (cstr.charCodeAt (i + startIndex) < 2048)){ j = j - 1 }
if ((cstr.charCodeAt (i + startIndex) > 2047) && (cstr.charCodeAt (i + startIndex) <65536)){ j = j - 2 }
if (cstr.charCodeAt (i + startIndex) >65535) { j = j - 3 }
}