summaryrefslogtreecommitdiff
path: root/dart
diff options
context:
space:
mode:
authorIvan Dlugos <6349682+vaind@users.noreply.github.com>2021-01-07 20:40:47 +0100
committerGitHub <noreply@github.com>2021-01-07 11:40:47 -0800
commit08d2ce844b1f03fda0a22d911f90943c5984b662 (patch)
tree88225acc60634e1cafed11614b507772fed98264 /dart
parenta15a8d930d894a0eca240f870bea1cc0674fcc42 (diff)
downloadflatbuffers-08d2ce844b1f03fda0a22d911f90943c5984b662.tar.gz
flatbuffers-08d2ce844b1f03fda0a22d911f90943c5984b662.tar.bz2
flatbuffers-08d2ce844b1f03fda0a22d911f90943c5984b662.zip
fix Dart Builder._writeString() - always write trailing zero byte (#6390)
Diffstat (limited to 'dart')
-rw-r--r--dart/lib/flat_buffers.dart1
1 files changed, 1 insertions, 0 deletions
diff --git a/dart/lib/flat_buffers.dart b/dart/lib/flat_buffers.dart
index 0f4ccbcc..99fd6a2d 100644
--- a/dart/lib/flat_buffers.dart
+++ b/dart/lib/flat_buffers.dart
@@ -670,6 +670,7 @@ class Builder {
for (int i = 0; i < length; i++) {
_buf.setUint8(offset++, bytes[i]);
}
+ _buf.setUint8(offset, 0); // trailing zero
return result;
}