jblanked 1 год назад
Родитель
Сommit
7e248acf24
2 измененных файлов с 4 добавлено и 3 удалено
  1. 1 1
      callback/callback.c
  2. 3 2
      game/storage.c

+ 1 - 1
callback/callback.c

@@ -645,7 +645,7 @@ static char *flip_world_parse_world_list(DataLoaderModel *model)
     furi_thread_start(thread);
     thread_id = furi_thread_get_id(thread);
     game_thread_running = true;
-    return "Game started";
+    return "Game starting... please wait :D";
 }
 static void flip_world_world_list_switch_to_view(FlipWorldApp *app)
 {

+ 3 - 2
game/storage.c

@@ -582,9 +582,9 @@ bool separate_world_data(char *id, FuriString *world_data)
         return false;
     }
     FuriString *file_json_data = json_data(world_data);
-    if (!file_json_data)
+    if (!file_json_data || furi_string_size(file_json_data) == 0)
     {
-        FURI_LOG_E("Game", "Failed to get json data");
+        FURI_LOG_E("Game", "Failed to get json data in separate_world_data");
         return false;
     }
 
@@ -616,6 +616,7 @@ bool separate_world_data(char *id, FuriString *world_data)
     {
         FURI_LOG_E("Game", "Failed to write json_data");
     }
+    storage_file_close(file);
 
     furi_string_replace_at(file_json_data, 0, 1, "");
     furi_string_replace_at(file_json_data, furi_string_size(file_json_data) - 1, 1, "");