Skip to content

Commit

Permalink
Issue 13
Browse files Browse the repository at this point in the history
  • Loading branch information
shamblett committed May 30, 2020
1 parent 2d99682 commit a5a0efd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 3.2.0
Issue 13

### 3.1.0
Issue 5

Expand Down
5 changes: 4 additions & 1 deletion lib/src/cbor_encoder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ class Encoder {
}
// Encode the value
var valType = val.runtimeType.toString();
if (valType.contains('List')) {
if (valType.contains('List') && valType != 'Uint8List') {
valType = 'List';
}
if (valType.contains('Map')) {
Expand Down Expand Up @@ -712,6 +712,9 @@ class Encoder {
case 'Uint8Buffer':
_writeRawBuffer(val);
break;
case 'Uint8List':
_writeBytes(typed.Uint8Buffer()..addAll(val));
break;
default:
print('writeMapImpl::RT is ${val.runtimeType.toString()}');
ok = false;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: cbor
description: A CBOR library for Dart. An RFC7049 compliant encoding/decoding CBOR implementation.
version: 3.1.0
version: 3.2.0
homepage: https://github.com/shamblett/cbor

environment:
Expand Down

0 comments on commit a5a0efd

Please sign in to comment.