www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/03/06:00:33

Date: Wed, 3 Apr 1996 14:44:23 +0400 (MSD)
From: "Alexander V. Lukyanov" <lav AT video DOT yars DOT free DOT net>
Message-Id: <199604031044.OAA28741@video.yars.free.net>
To: Broeker AT axp03 DOT physik DOT rwth-aachen DOT de, djgpp AT delorie DOT com
Subject: Re: bug sscanf when match fails ?

> From: Broeker AT axp03 DOT physik DOT rwth-aachen DOT de (Hans-Bernhard Broeker)

> --- 104,112 ----
>                &amp;fileended) &amp;&amp; ptr)
>         nmatch++;
>   /* breaks %n */
> !     else if (fileended) { /* HBB: if conversion failed, stop action immediately*/
>         return(nmatch? nmatch: -1);
> !     }
>       break;
>     case ' ':
>     case '\n':

Shouldn't scanf exit if match failed and eof is not reached?
See my patch (Subject "doscan patch") on this list. It fixes two problems
recently reported. I have sent it to djgpp-workers two days ago.

> Hans-Bernhard Broeker (Aachen, Germany)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019