aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alc.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2024-01-03 19:46:59 -0800
committerChris Robinson <[email protected]>2024-01-03 19:46:59 -0800
commit744bd1e289502f3ab413a4026f3dc9a6b6e07a72 (patch)
tree9f1005bfec1194a9fbd23d58193e2d11310b1e1d /alc/alc.cpp
parent8c80f29e242dee18cb914d3cdb396bd96e935547 (diff)
Avoid redundant definitions
Diffstat (limited to 'alc/alc.cpp')
-rw-r--r--alc/alc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/alc/alc.cpp b/alc/alc.cpp
index b63317e7..b629a3fc 100644
--- a/alc/alc.cpp
+++ b/alc/alc.cpp
@@ -2057,7 +2057,7 @@ ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *Device, ALCenum para
ProbeAllDevicesList();
/* Copy first entry as default. */
- alcDefaultAllDevicesSpecifier = alcAllDevicesList.c_str();
+ alcDefaultAllDevicesSpecifier = alcAllDevicesList.substr(0, alcAllDevicesList.find('\0'));
value = alcDefaultAllDevicesSpecifier.c_str();
break;
@@ -2066,7 +2066,8 @@ ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *Device, ALCenum para
ProbeCaptureDeviceList();
/* Copy first entry as default. */
- alcCaptureDefaultDeviceSpecifier = alcCaptureDeviceList.c_str();
+ alcCaptureDefaultDeviceSpecifier = alcCaptureDeviceList.substr(0,
+ alcCaptureDeviceList.find('\0'));
value = alcCaptureDefaultDeviceSpecifier.c_str();
break;