Fix for UTF-8 roundtrip verification bug.
The problem was that the round-trip verification code copies the current state, which may contain intermediate Parser state for multibyte characters and ANSI escape sequences. It then applies diffs to that copy, which may appear as badly formed input. Also removes some dead, never-used code.
This commit is contained in:
@@ -138,7 +138,12 @@ namespace Network {
|
||||
/* Misc. getters and setters */
|
||||
/* Cannot modify current_state while shutdown in progress */
|
||||
MyState &get_current_state( void ) { assert( !shutdown_in_progress ); return current_state; }
|
||||
void set_current_state( const MyState &x ) { assert( !shutdown_in_progress ); current_state = x; }
|
||||
void set_current_state( const MyState &x )
|
||||
{
|
||||
assert( !shutdown_in_progress );
|
||||
current_state = x;
|
||||
current_state.reset_input();
|
||||
}
|
||||
void set_verbose( void ) { verbose = true; }
|
||||
|
||||
bool get_shutdown_in_progress( void ) const { return shutdown_in_progress; }
|
||||
|
||||
Reference in New Issue
Block a user