OpenAmiga (226/964)

From:Jesse McClusky
Date:9 Sep 2000 at 18:08:21
Subject:Re: AMIOPEN: [Q] gets and puts

> From: "Marc Culler" <culler@math.uic.edu>
>
> Looks like a bug to me. I got the same results. Ther is nothing
> special about the < and > characters. However, if I replace
> gets(str);
> with
> fgets(str, 256, stdin);
> it works just fine, except of course that the string has LF at the end.
>
> The fgets call has the advantage that it won't overrun your buffer.
> But lib/gets, dangerous as it may be, does indeed seem to be broken.

Maybe we should just replace all the dangerous functions with
pop-up messages saying, "Fix your code, you dork! You should
be GLAD we put this in here, telling you where you have bad
code before it breaks on someone and screws EVERYTHING
up!" (:

Jesse

Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html