Fix buffer overflow in GTerm::update_changes()