aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/wave.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/wave.cpp')
-rw-r--r--Alc/backends/wave.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/backends/wave.cpp b/Alc/backends/wave.cpp
index 48b3e911..ea4af146 100644
--- a/Alc/backends/wave.cpp
+++ b/Alc/backends/wave.cpp
@@ -242,7 +242,8 @@ static ALCenum ALCwaveBackend_open(ALCwaveBackend *self, const ALCchar *name)
}
ALCdevice *device{STATIC_CAST(ALCbackend, self)->mDevice};
- alstr_copy_cstr(&device->DeviceName, name);
+ al_free(device->DeviceName);
+ device->DeviceName = alstrdup(name);
return ALC_NO_ERROR;
}