On Mon, Oct 10, 2016 at 11:40 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Mon, Oct 10, 2016 at 5:36 PM, Roland Mainz <roland.ma...@nrubsig.org> > wrote: >> On Mon, Oct 10, 2016 at 6:12 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: >>> Signed-off-by: Ilia Mirkin <imir...@alum.mit.edu> >>> --- >>> src/gallium/auxiliary/tgsi/tgsi_text.c | 7 ++++++- >>> 1 file changed, 6 insertions(+), 1 deletion(-) >>> >>> diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c >>> b/src/gallium/auxiliary/tgsi/tgsi_text.c >>> index be80842..36dc979 100644 >>> --- a/src/gallium/auxiliary/tgsi/tgsi_text.c >>> +++ b/src/gallium/auxiliary/tgsi/tgsi_text.c >>> @@ -257,8 +257,13 @@ static boolean parse_float( const char **pcur, float >>> *val ) >>> cur++; >>> } >>> } >>> - if (!integral_part && !fractional_part) >>> + if (!integral_part && !fractional_part) { >>> + if (uprcase(*cur++) == 'N' && >>> + uprcase(*cur++) == 'A' && >>> + uprcase(*cur++) == 'N') >>> + goto out; >>> return FALSE; >>> + } >>> if (uprcase( *cur ) == 'E') { >>> cur++; >>> if (*cur == '-' || *cur == '+') >> >> Not digging around in the code... but... >> ... do you handle -nan and +nan ? > > Further up: > > *val = (float) atof( cur ); > if (*cur == '-' || *cur == '+') > cur++;
Thanks... :-) > I'd kinda prefer to use strtof() and get rid of this function. Does > that work on MSVC? No idea... ;-( ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.ma...@nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev