For primitive types, the coercive casts never fail. Let's be lenient and let
a TypedArray of int work if people fill it with strings like "4" or "9". git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4854 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -105,12 +105,12 @@ public class ArrayStreamer extends Streamer
|
|||||||
out.writeInt(arr.length);
|
out.writeInt(arr.length);
|
||||||
if (_elementType == int) {
|
if (_elementType == int) {
|
||||||
for (ii = 0; ii < arr.length; ii++) {
|
for (ii = 0; ii < arr.length; ii++) {
|
||||||
out.writeInt(arr[ii] as int);
|
out.writeInt(int(arr[ii]));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (_elementType == Boolean) {
|
} else if (_elementType == Boolean) {
|
||||||
for (ii = 0; ii < arr.length; ii++) {
|
for (ii = 0; ii < arr.length; ii++) {
|
||||||
out.writeBoolean(arr[ii] as Boolean);
|
out.writeBoolean(Boolean(arr[ii]));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (_isFinal) {
|
} else if (_isFinal) {
|
||||||
|
|||||||
Reference in New Issue
Block a user