summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/game_scanner.cpp8
-rw-r--r--src/game/game_scanner.hpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/game/game_scanner.cpp b/src/game/game_scanner.cpp
index a251f3386..bc02f6afd 100644
--- a/src/game/game_scanner.cpp
+++ b/src/game/game_scanner.cpp
@@ -23,9 +23,9 @@ void GameScannerInfo::Initialize()
ScriptScanner::Initialize("GSScanner");
}
-void GameScannerInfo::GetScriptName(ScriptInfo *info, char *name, int len)
+void GameScannerInfo::GetScriptName(ScriptInfo *info, char *name, const char *last)
{
- snprintf(name, len, "%s", info->GetName());
+ seprintf(name, last, "%s", info->GetName());
}
void GameScannerInfo::RegisterAPI(class Squirrel *engine)
@@ -86,10 +86,10 @@ void GameScannerLibrary::Initialize()
ScriptScanner::Initialize("GSScanner");
}
-void GameScannerLibrary::GetScriptName(ScriptInfo *info, char *name, int len)
+void GameScannerLibrary::GetScriptName(ScriptInfo *info, char *name, const char *last)
{
GameLibrary *library = static_cast<GameLibrary *>(info);
- snprintf(name, len, "%s.%s", library->GetCategory(), library->GetInstanceName());
+ seprintf(name, last, "%s.%s", library->GetCategory(), library->GetInstanceName());
}
void GameScannerLibrary::RegisterAPI(class Squirrel *engine)
diff --git a/src/game/game_scanner.hpp b/src/game/game_scanner.hpp
index f1d334f0f..071d19d38 100644
--- a/src/game/game_scanner.hpp
+++ b/src/game/game_scanner.hpp
@@ -28,7 +28,7 @@ public:
class GameInfo *FindInfo(const char *nameParam, int versionParam, bool force_exact_match);
protected:
- /* virtual */ void GetScriptName(ScriptInfo *info, char *name, int len);
+ /* virtual */ void GetScriptName(ScriptInfo *info, char *name, const char *last);
/* virtual */ const char *GetFileName() const { return PATHSEP "info.nut"; }
/* virtual */ Subdirectory GetDirectory() const { return GAME_DIR; }
/* virtual */ const char *GetScannerName() const { return "Game Scripts"; }
@@ -49,7 +49,7 @@ public:
class GameLibrary *FindLibrary(const char *library, int version);
protected:
- /* virtual */ void GetScriptName(ScriptInfo *info, char *name, int len);
+ /* virtual */ void GetScriptName(ScriptInfo *info, char *name, const char *last);
/* virtual */ const char *GetFileName() const { return PATHSEP "library.nut"; }
/* virtual */ Subdirectory GetDirectory() const { return GAME_LIBRARY_DIR; }
/* virtual */ const char *GetScannerName() const { return "GS Libraries"; }