We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaf0095 commit 67627aaCopy full SHA for 67627aa
Launchers/retro-esp32/main/main.c
@@ -1240,22 +1240,7 @@ void handle_line(char *line) {
1240
f = fopen(file, "wb");
1241
fprintf(f, "Favorites List");
1242
} else {
1243
- int size = 1024, pos;
1244
- int c;
1245
- char *buffer = (char *)malloc(size);
1246
- do { // read all lines in file
1247
- pos = 0;
1248
- do{ // read one line
1249
- c = fgetc(f);
1250
- if(c != EOF) buffer[pos++] = (char)c;
1251
- if(pos >= size - 1) { // increase buffer length - leave room for 0
1252
- size *=2;
1253
- buffer = (char*)realloc(buffer, size);
1254
- }
1255
- } while(c != EOF && c != '\n');
1256
- buffer[pos] = 0;
1257
- handle_line(buffer);
1258
- } while(c != EOF);
+
1259
}
1260
fclose(f);
1261
0 commit comments