Procházet zdrojové kódy

Added nspire .tns suffix to Quirks

Eiyeron Fulmincendii před 10 roky
rodič
revize
1349dbb1ae
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      platform/nspire/Quirks.cpp

+ 3 - 1
platform/nspire/Quirks.cpp

@@ -43,8 +43,10 @@ void Quirks::deinit()
 
 std::unique_ptr<char> Quirks::solve_absolute_path(const char *path)
 {
-    std::unique_ptr<char> result(new char[strlen(base_path) + strlen(path)]);
+    static const char nspire_suffix[] = ".tns";
+    std::unique_ptr<char> result(new char[strlen(base_path) + strlen(path) + strlen(nspire_suffix)]);
     strcpy(result.get(), base_path);
     strcpy(&result.get()[strlen(base_path)], path);
+    strcpy(&result.get()[strlen(base_path)+strlen(nspire_suffix)], nspire_suffix);
     return result;
 }