Explorar o código

Firmware/FatFs: make f_gets break on NUL character as well

Maximilian Rehkopf %!s(int64=12) %!d(string=hai) anos
pai
achega
f4b8d57810
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/ff.c

+ 1 - 0
src/ff.c

@@ -3644,6 +3644,7 @@ TCHAR* f_gets (
 		*p++ = c;
 		n++;
 		if (c == '\n') break;		/* Break on EOL */
+		if (c == 0) break;		/* Break on NUL */
 	}
 	*p = 0;
 	return n ? buff : 0;			/* When no data read (eof or error), return with error. */