File tree Expand file tree Collapse file tree 5 files changed +7
-96
lines changed
Expand file tree Collapse file tree 5 files changed +7
-96
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -74,14 +74,14 @@ export class DashmipsDebugClient extends EventEmitter {
7474 this . cutoffData = ''
7575 this . cutoffDataLength = 0
7676 }
77- const re = / { " s i z e " : [ 0 - 9 ] + } /
77+ const re = / { \s * " s i z e " \s * : \s * \d + \s * } /
7878 while ( data ) {
79- const m = re . exec ( data )
80- if ( m ) {
81- const n = JSON . parse ( m [ 0 ] ) . size
79+ const match = re . exec ( data )
80+ if ( match ) {
81+ const { size } = JSON . parse ( match [ 0 ] )
8282
83- const message = data . slice ( m [ 0 ] . length , n + m [ 0 ] . length )
84- data = data . slice ( n + m [ 0 ] . length )
83+ const message = data . slice ( match [ 0 ] . length , size + match [ 0 ] . length )
84+ data = data . slice ( size + match [ 0 ] . length )
8585
8686 try {
8787 const response : DashmipsResponse = JSON . parse ( message )
@@ -96,7 +96,7 @@ export class DashmipsDebugClient extends EventEmitter {
9696 }
9797 } catch {
9898 this . cutoffData = message
99- this . cutoffDataLength = n
99+ this . cutoffDataLength = size
100100 break
101101 }
102102 }
You can’t perform that action at this time.
0 commit comments