ReadStdin() returns the last line twice

Archives Forums/BlitzMax Bug Reports/ReadStdin() returns the last line twice

grable(Posted 2012) [#1]
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;



marksibly(Posted 2012) [#2]
Thanks!