File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,13 @@ class BaseBuffer
199
199
return this . getUInt16 ( this . _updatePos ( 2 ) ) ;
200
200
}
201
201
202
+ /**
203
+ * Read from state position.
204
+ */
205
+ readUInt32 ( ) {
206
+ return this . getUInt32 ( this . _updatePos ( 4 ) ) ;
207
+ }
208
+
202
209
/**
203
210
* Read from state position.
204
211
*/
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ describe('packstream', function() {
47
47
it ( 'should pack strings' , function ( ) {
48
48
expect ( packAndUnpack ( "" ) ) . toBe ( "" ) ;
49
49
expect ( packAndUnpack ( "abcdefg123567" ) ) . toBe ( "abcdefg123567" ) ;
50
+ var str = Array ( 65536 + 1 ) . join ( 'a' ) ; // 2 ^ 16 + 1
51
+ expect ( packAndUnpack ( str , str . length + 8 ) ) . toBe ( str ) ;
50
52
} ) ;
51
53
it ( 'should pack structures' , function ( ) {
52
54
expect ( packAndUnpack ( new Structure ( 1 , [ "Hello, world!!!" ] ) ) . fields [ 0 ] )
You can’t perform that action at this time.
0 commit comments