Просмотр исходного кода

Improves the detection of blank lines

acegoal07 1 год назад
Родитель
Сommit
0c371a2653
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      scenes/nfc_playlist_scene_emulation.c

+ 3 - 1
scenes/nfc_playlist_scene_emulation.c

@@ -32,7 +32,9 @@ int32_t nfc_playlist_emulation_task(void* context) {
 
          char* file_path = (char*)furi_string_get_cstr(line);
 
-         if (strlen(file_path) <= 1) {continue;}
+         if (strspn(file_path, " \t\n\r") == strlen(file_path)) {
+            continue;
+         }
 
          if (nfc_playlist->settings.emulate_delay > 0 && file_position != 0 && !skip_delay) {
             popup_set_header(nfc_playlist->popup, "Delaying", 64, 10, AlignCenter, AlignTop);