File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
nanoFramework.CoreLibrary/System Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- //
1
+ //
2
2
// Copyright (c) .NET Foundation and Contributors
3
3
// Portions Copyright (c) Microsoft Corporation. All rights reserved.
4
4
// See LICENSE file in the project root for full license information.
@@ -112,14 +112,14 @@ public byte this[int index]
112
112
/// </exception>
113
113
public void CopyTo ( SpanByte destination )
114
114
{
115
- if ( destination . Length < _length - _start )
115
+ if ( destination . Length < _length )
116
116
{
117
117
throw new ArgumentException ( $ "Destination too small") ;
118
118
}
119
119
120
- for ( int i = 0 ; i < _array . Length ; i ++ )
120
+ for ( int i = 0 ; i < _length ; i ++ )
121
121
{
122
- destination [ i ] = _array [ i ] ;
122
+ destination [ i ] = _array [ _start + i ] ;
123
123
}
124
124
}
125
125
You can’t perform that action at this time.
0 commit comments