ReadStdin() returns the last line twice
Archives Forums/BlitzMax Bug Reports/ReadStdin() returns the last line twice
| ||
Since it doesnt check the return value of fgets(), the last call will return NULL and not write anything if it doesnt read any characters. Leaving the previous value in the buffer. a simple fix is adding this before the call to fgets() buf[0]=0; |
| ||
Thanks! |