🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gnu.g++.lib.bug
1 messages
1 total messages Started by Martin Junius Tue, 27 Oct 1992 11:36
libg++-2.2 - bug in filebuf.C
#1
Author: Martin Junius
Date: Tue, 27 Oct 1992 11:36
32 lines
1386 bytes
Hi!

libg++-2.2 as of prep.ai.mit.edu:

There seems to be a bug in the underflow()/overflow() handling in 
filebuf's. When both reading and writing the buffer pointers get 
messed up. The problem is that _S_CURRENTLY_PUTTING isn't cleared 
when starting a new read operation.

I added the following patch to iostream/filebuf.C to solve this 
problem:

*** filebuf.C-ORIG	Tue Oct 27 12:18:56 1992
--- filebuf.C	Tue Oct 27 12:19:47 1992
***************
*** 267,272 ****
--- 267,274 ----
  	if (do_flush()) return EOF;
  #endif
  
+     switch_to_get_mode();
+ 
      _G_ssize_t count = sys_read(base(), ebuf() - base());
      if (count <= 0) {
  	if (count == 0)

Martin
-- 
 _____ _____
|     |___  |   Martin Junius           FIDO:      2:242/6.1
| | | |   | |   Communication Networks  Internet:  mj@dfv.rwth-aachen.de
|_|_|_|@work|   Aachen U of Technology  Phone:     ++49-241-8790220 (voice)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads