[FL-1705] Fix IRDA SD eject (#799)
Removing SD card during brut-force causes endless loop. This is because calling a string_t destructor invalidates variable, but we did checking string_size() after. Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
63fe452746
commit
b397442d89
@ -367,7 +367,7 @@ bool file_worker_read_until_buffered(
|
|||||||
file_worker->file, &file_buf[*file_buf_cnt], file_buf_size - *file_buf_cnt);
|
file_worker->file, &file_buf[*file_buf_cnt], file_buf_size - *file_buf_cnt);
|
||||||
if(storage_file_get_error(file_worker->file) != FSE_OK) {
|
if(storage_file_get_error(file_worker->file) != FSE_OK) {
|
||||||
file_worker_show_error_internal(file_worker, "Cannot read\nfile");
|
file_worker_show_error_internal(file_worker, "Cannot read\nfile");
|
||||||
string_clear(str_result);
|
string_clean(str_result);
|
||||||
*file_buf_cnt = 0;
|
*file_buf_cnt = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user