superficial tweak

This commit is contained in:
Joel Dice 2007-10-24 17:05:14 -06:00
parent 5dfba99545
commit 92d61c1ba2

View File

@ -507,7 +507,7 @@ parseUtf8(Thread* t, Stream& s, unsigned length)
{ {
object value = makeByteArray(t, length + 1, false); object value = makeByteArray(t, length + 1, false);
unsigned vi = 0; unsigned vi = 0;
for (unsigned si = 0; si < length; ++ si, ++ vi) { for (unsigned si = 0; si < length; ++si) {
unsigned a = s.read1(); unsigned a = s.read1();
if (a & 0x80) { if (a & 0x80) {
++ si; ++ si;
@ -516,12 +516,12 @@ parseUtf8(Thread* t, Stream& s, unsigned length)
unsigned b = s.read1(); unsigned b = s.read1();
if (a == 0xC0 and b == 0x80) { if (a == 0xC0 and b == 0x80) {
byteArrayBody(t, value, vi) = 0; byteArrayBody(t, value, vi++) = 0;
} else { } else {
abort(t); // todo abort(t); // todo
} }
} else { } else {
byteArrayBody(t, value, vi) = a; byteArrayBody(t, value, vi++) = a;
} }
} }