Commit ce3a1c43 authored by Light Lin's avatar Light Lin Committed by Wouter van Oortmerssen

[Dart] Fix prepare space for writeListInt64 and writeListUint64 (#5654)

* Fix prepare space for writeListInt64 and 

writeListUint64

* Fix align issues
parent aa75e573
......@@ -492,7 +492,7 @@ class Builder {
/// Write the given list of 64-bit float [values].
int writeListFloat64(List<double> values) {
_ensureNoVTable();
_prepare(4, 1 + (2 * values.length));
_prepare(_sizeofFloat64, values.length, additionalBytes: _sizeofUint32);
final int result = _tail;
int tail = _tail;
_setUint32AtTail(_buf, tail, values.length);
......@@ -522,7 +522,7 @@ class Builder {
/// Write the given list of signed 64-bit integer [values].
int writeListInt64(List<int> values) {
_ensureNoVTable();
_prepare(_sizeofUint32, 2 * values.length);
_prepare(_sizeofInt64, values.length, additionalBytes: _sizeofUint32);
final int result = _tail;
int tail = _tail;
_setUint32AtTail(_buf, tail, values.length);
......@@ -537,7 +537,7 @@ class Builder {
/// Write the given list of signed 64-bit integer [values].
int writeListUint64(List<int> values) {
_ensureNoVTable();
_prepare(_sizeofUint32, 2 * values.length);
_prepare(_sizeofUint64, values.length, additionalBytes: _sizeofUint32);
final int result = _tail;
int tail = _tail;
_setUint32AtTail(_buf, tail, values.length);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment