aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-06-06 04:39:30 -0700
committerChris Robinson <[email protected]>2019-06-06 04:39:30 -0700
commit87ccdf02a7f2c9611badaa434a91eb1cf31a4b97 (patch)
tree5fc4f2ab014b1036145f08f4620baff56056bfaa /Alc
parent56faf66887acb1b8481efec21eb223670524a50a (diff)
Avoid strcpy
Diffstat (limited to 'Alc')
-rw-r--r--Alc/hrtf.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/hrtf.cpp b/Alc/hrtf.cpp
index 668e5b24..2584ef13 100644
--- a/Alc/hrtf.cpp
+++ b/Alc/hrtf.cpp
@@ -1101,7 +1101,8 @@ void AddFileEntry(al::vector<EnumeratedHrtf> &list, const std::string &filename)
LoadedHrtfs.emplace_back(HrtfHandle::Create(filename.length()+1));
loaded_entry = LoadedHrtfs.end()-1;
- strcpy((*loaded_entry)->filename.data(), filename.c_str());
+ std::copy(filename.begin(), filename.end(), (*loaded_entry)->filename.begin());
+ (*loaded_entry)->filename.back() = '\0';
}
/* TODO: Get a human-readable name from the HRTF data (possibly coming in a