test/test_physfs.c
branchstable-2.0
changeset 1028 69a19ed65049
parent 956 3da716cfe09f
child 1082 94771621792f
equal deleted inserted replaced
1022:38a62549ad4c 1028:69a19ed65049
  1114             return;
  1114             return;
  1115         } /* if */
  1115         } /* if */
  1116 
  1116 
  1117         do
  1117         do
  1118         {
  1118         {
  1119             fgets(buf, sizeof (buf), f);
  1119             if (fgets(buf, sizeof (buf), f) == NULL)
       
  1120                 break;
       
  1121 
  1120             if (buf[strlen(buf) - 1] == '\n')
  1122             if (buf[strlen(buf) - 1] == '\n')
  1121                 buf[strlen(buf) - 1] = '\0';
  1123                 buf[strlen(buf) - 1] = '\0';
  1122             add_history(buf);
  1124             add_history(buf);
  1123         } while (!feof(f));
  1125         } while (!feof(f));
  1124 
  1126