Merge branch 'dev' into zlo/mystery-applications-memory-corrupt

This commit is contained in:
Sergey Gavrilov
2022-11-14 17:16:08 +10:00
committed by GitHub
31 changed files with 255 additions and 126 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ void path_extract_extension(FuriString* path, char* ext, size_t ext_len_max) {
size_t dot = furi_string_search_rchar(path, '.');
size_t filename_start = furi_string_search_rchar(path, '/');
if((dot > 0) && (filename_start < dot)) {
if((dot != FURI_STRING_FAILURE) && (filename_start < dot)) {
strlcpy(ext, &(furi_string_get_cstr(path))[dot], ext_len_max);
}
}