🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #245

sgetn bug

#245
From: Peter Bumbulis
Date: Mon, 13 Apr 1992 17:06
18 lines
748 bytes
The following program
	#include <iostream.h>
	
	main(){
	    char buf[100];
	    cout.write(buf, cin.rdbuf()->sgetn(buf, sizeof(buf)));
	}

when given input
	#include <stdlib.h>

produces
	##include <stdlib.h>

i.e., the first character is duplicated.  (I'm not sure which version of
the library this is;  it was installed with gcc-2.1.)

Peter
Technical Details
Message-ID: <1992Apr13.170616.22469@watserv1.waterloo.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!csg.uwaterloo.ca!peter

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!csg.uwaterloo.ca!peter
From: peter@csg.uwaterloo.ca (Peter Bumbulis)
Subject: sgetn bug
Message-ID: <1992Apr13.170616.22469@watserv1.waterloo.edu>
Sender: gnulists@ai.mit.edu
Organization: University of Waterloo
Distribution: gnu
Date: Mon, 13 Apr 1992 17:06:16 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 19