Sscanf bug?
#4

Sscanf's original code has a bug with floats. Replace case f with the next code (fix wasn't made by me btw).

pawn Код:
case 'f':
            {
              new changestr[16], changepos = 0, strpos = stringPos;
                while(changepos < 16 && string[strpos] && string[strpos] != delim)
                {
                changestr[changepos++] = string[strpos++];
              }
              changestr[changepos] = '\0';
              setarg(paramPos,0,_:floatstr(changestr));
            }
Reply


Messages In This Thread
Sscanf bug? - by SoeH - 27.11.2009, 13:29
Re: Sscanf bug? - by dice7 - 27.11.2009, 13:42
Re: Sscanf bug? - by SoeH - 27.11.2009, 13:51
Re: Sscanf bug? - by Sergei - 27.11.2009, 13:51
Re: Sscanf bug? - by SoeH - 27.11.2009, 13:57

Forum Jump:


Users browsing this thread: 1 Guest(s)