File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/Renci.SshNet/Messages/Connection/ChannelRequest Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -137,18 +137,22 @@ protected override void SaveData()
137
137
138
138
if ( TerminalModeValues != null )
139
139
{
140
+ // write total length of encoded terminal modes, which is 1 bytes for the opcode / terminal mode
141
+ // and 4 bytes for the uint argument for each entry; the encoded terminal modes are terminated by
142
+ // opcode TTY_OP_END (which is 1 byte)
140
143
Write ( ( uint ) TerminalModeValues . Count * ( 1 + 4 ) + 1 ) ;
141
144
142
145
foreach ( var item in TerminalModeValues )
143
146
{
144
147
Write ( ( byte ) item . Key ) ;
145
148
Write ( item . Value ) ;
146
149
}
147
- Write ( ( byte ) 0 ) ;
150
+
151
+ Write ( ( byte ) TerminalModes . TTY_OP_END ) ;
148
152
}
149
153
else
150
154
{
151
- Write ( ( uint ) 0 ) ;
155
+ Write ( ( uint ) 0 ) ;
152
156
}
153
157
}
154
158
}
You can’t perform that action at this time.
0 commit comments