/FollowMe/trunk/fat16.c |
---|
1676,12 → 1676,14 |
int8_t *pbuff; |
int16_t c = 0, bytecount; |
if((!Partition.IsValid) || (file == NULL) || (string == NULL) || (length > 1)) return (0); |
if( (!Partition.IsValid) || (file == NULL) || (string == NULL) || (length < 1) ) return (0); |
pbuff = string; |
bytecount = length; |
while(bytecount > 1) // read the count-1 characters from the file to the string. |
{ |
c = fgetc_(file); // read a character from the opened file. |
switch(c) |
{ |
case 0x0A: |