File tree 2 files changed +4
-4
lines changed
src/G2DataGUI.Common/Data/Common
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public string Description
15
15
string description = "" ;
16
16
foreach ( var character in _characters )
17
17
{
18
- description += Convert . ToChar ( character ) ;
18
+ description += character > 0 ? Convert . ToChar ( character ) : ' ' ;
19
19
}
20
20
21
21
return description . TrimEnd ( ) ;
@@ -25,7 +25,7 @@ public string Description
25
25
value = value . PadRight ( ( int ) MaxLength , ' ' ) ;
26
26
for ( int index = 0 ; index < MaxLength ; index ++ )
27
27
{
28
- _characters [ index ] = Convert . ToByte ( _characters [ index ] ) ;
28
+ _characters [ index ] = Convert . ToByte ( value [ index ] ) ;
29
29
}
30
30
}
31
31
}
@@ -43,4 +43,4 @@ public void WriteFixedLengthDescription(Stream writer) =>
43
43
writer . WriteRawByteArray ( _characters ) ;
44
44
45
45
public static uint MaxLength { get => 40 ; }
46
- }
46
+ }
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public string Name
22
22
}
23
23
set
24
24
{
25
- value = value . PadRight ( ( int ) MaxLength , ' ' ) ;
25
+ value = value . PadLeft ( ( int ) MaxLength , ' ' ) ;
26
26
for ( int index = 0 ; index < MaxLength ; index ++ )
27
27
{
28
28
_characters [ index ] = Convert . ToByte ( value [ index ] ) ;
You can’t perform that action at this time.
0 commit comments