Skip to content

Commit e4f2314

Browse files
committed
FS_LoadedPaks(): use std::string
1 parent 87df3f9 commit e4f2314

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/engine/qcommon/files.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -621,18 +621,18 @@ int FS_GetFileListRecursive(const char* path, const char* extension, char* listB
621621
return numFiles;
622622
}
623623

624-
const char* FS_LoadedPaks()
624+
std::string FS_LoadedPaks()
625625
{
626-
static char info[BIG_INFO_STRING];
627-
info[0] = '\0';
626+
std::string out;
628627
for (const FS::LoadedPakInfo& x: FS::PakPath::GetLoadedPaks()) {
629628
if (!x.pathPrefix.empty())
630629
continue;
631-
if (info[0])
632-
Q_strcat(info, sizeof(info), " ");
633-
Q_strcat(info, sizeof(info), FS::MakePakName(x.name, x.version, x.realChecksum).c_str());
630+
if ( out.size() ) {
631+
out += " ";
632+
}
633+
out += FS::MakePakName(x.name, x.version, x.realChecksum);
634634
}
635-
return info;
635+
return out;
636636
}
637637

638638
bool FS_LoadPak(const Str::StringRef name)

src/engine/qcommon/qcommon.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ int FS_Seek( fileHandle_t f, long offset, fsOrigin_t origin );
423423

424424
// seek on a file (doesn't work for zip files!!!!!!!!)
425425

426-
const char* FS_LoadedPaks();
426+
std::string FS_LoadedPaks();
427427

428428
// Returns a space separated string containing all loaded dpk/pk3 files.
429429

0 commit comments

Comments
 (0)