diff options
author | Chris Robinson <[email protected]> | 2023-12-08 04:33:32 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-08 04:33:32 -0800 |
commit | 8f661a2f59e63cbed540b512dc564a3aca7c4211 (patch) | |
tree | 8c8fbd2be037eaaf254feabe061642bea96c4bd2 /alc/alu.cpp | |
parent | 5b5b948516f7340810ebbfdd5e46eb40f85d2e56 (diff) |
Fix some clang-tidy warnings
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r-- | alc/alu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp index 7b3cd957..fe47f9be 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -2257,10 +2257,10 @@ void DeviceBase::handleDisconnect(const char *msg, ...) va_list args; va_start(args, msg); - int msglen{vsnprintf(disconnect.msg, sizeof(disconnect.msg), msg, args)}; + int msglen{vsnprintf(disconnect.msg.data(), disconnect.msg.size(), msg, args)}; va_end(args); - if(msglen < 0 || static_cast<size_t>(msglen) >= sizeof(disconnect.msg)) + if(msglen < 0 || static_cast<size_t>(msglen) >= disconnect.msg.size()) disconnect.msg[sizeof(disconnect.msg)-1] = 0; for(ContextBase *ctx : *mContexts.load()) |