View Issue Details

IDProjectCategoryView StatusLast Update
0000123LDMud 3.2-devNetworkingpublic2005-05-15 15:05
ReporterGnomi Assigned Tolars 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi686OSDebian GNU/LinuxOS Version3.0
Summary0000123: In charmode the driver kills subsequent lines
DescriptionAfter an INPUT_CHARMODE input_to the deactivation of the charmode in set_noecho calls reset_input_buffer which basically sets .command_start to zero and so has to move the input_buffer accordingly. But it assumes that there is only input till .tn_end and copies only this part of the buffer (and sets .text_end accordingly).

If two or more lines were sent at once .tn_end just points to the end of the first line (where scanning for telnet negotiations has ended the last time), the real end is shown by .text_end. So reset_input_buffer discards everything after the first line.

The following patch fixes this for me:

--- src.old/comm.c 2004-07-26 05:26:09.000000000 +0200
+++ src/comm.c 2004-08-26 23:07:51.000000000 +0200
@@ -2203,17 +2203,19 @@
         DT(("'%s' reset input buffer: cmd_start %d, tn_start %d, tn_end %d\n", ip->ob->name, ip->command_start, ip->tn_start, ip->tn_end));
         ip->tn_start -= ip->command_start;
         ip->tn_end -= ip->command_start;
+ ip->text_end -= ip->command_start;
         if (ip->tn_start < 0)
             ip->tn_start = 0;
- if (ip->tn_end <= 0)
+ if (ip->tn_end < 0)
             ip->tn_end = 0;
+ if (ip->text_end <= 0)
+ ip->text_end = 0;
         else
         {
             move_memory( ip->text, ip->text + ip->command_start
- , ip->tn_end
+ , ip->text_end
                        );
         }
- ip->text_end = ip->tn_end;
         if (ip->command_end)
             ip->command_end = ip->tn_end;
         ip->command_start = 0;


Greetings,
Gnomi.
TagsNo tags attached.

Activities

lars

2004-09-04 01:41

reporter   ~0000154

Looks sensible - corrected in 3.3.592 and 3.2.11-dev.664.

Issue History

Date Modified Username Field Change
2004-08-26 16:29 Gnomi New Issue
2004-09-04 01:41 lars Status new => resolved
2004-09-04 01:41 lars Resolution open => fixed
2004-09-04 01:41 lars Assigned To => lars
2004-09-04 01:41 lars Note Added: 0000154
2005-05-15 15:05 lars Status resolved => closed