File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -378,8 +378,10 @@ class SharedMap {
378378 this . stats . collisions ++ ;
379379 /* Replacing existing key */
380380 if ( this . _match ( key , pos ) ) {
381- for ( let i = 0 ; i < value . length ; i ++ )
381+ let i ;
382+ for ( i = 0 ; i < value . length ; i ++ )
382383 this . valuesData [ pos * this . meta [ META . objSize ] + i ] = value . charCodeAt ( i ) ;
384+ this . valuesData [ pos * this . meta [ META . objSize ] + i ] = 0 ;
383385 exclusive || this . _unlockLine ( slidingLock ) ;
384386 return ;
385387 }
Original file line number Diff line number Diff line change @@ -379,8 +379,10 @@ export default class SharedMap {
379379 this . stats . collisions ++ ;
380380 /* Replacing existing key */
381381 if ( this . _match ( key , pos ) ) {
382- for ( let i = 0 ; i < value . length ; i ++ )
382+ let i ;
383+ for ( i = 0 ; i < value . length ; i ++ )
383384 this . valuesData [ pos * this . meta [ META . objSize ] + i ] = value . charCodeAt ( i ) ;
385+ this . valuesData [ pos * this . meta [ META . objSize ] + i ] = 0 ;
384386 exclusive || this . _unlockLine ( slidingLock ) ;
385387 return ;
386388 }
Original file line number Diff line number Diff line change 384384 this . stats . collisions ++ ;
385385 /* Replacing existing key */
386386 if ( this . _match ( key , pos ) ) {
387- for ( let i = 0 ; i < value . length ; i ++ )
387+ let i ;
388+ for ( i = 0 ; i < value . length ; i ++ )
388389 this . valuesData [ pos * this . meta [ META . objSize ] + i ] = value . charCodeAt ( i ) ;
390+ this . valuesData [ pos * this . meta [ META . objSize ] + i ] = 0 ;
389391 exclusive || this . _unlockLine ( slidingLock ) ;
390392 return ;
391393 }
You can’t perform that action at this time.
0 commit comments