From c808c67f3ff63abce449be5d6a890779f33d4fab Mon Sep 17 00:00:00 2001 From: Neko-Life Date: Sat, 13 Apr 2024 20:29:11 +0700 Subject: [PATCH] refactor: avoid hardcoded suze --- src/dpp/discordvoiceclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dpp/discordvoiceclient.cpp b/src/dpp/discordvoiceclient.cpp index 032b1e3acd..a0fac04321 100644 --- a/src/dpp/discordvoiceclient.cpp +++ b/src/dpp/discordvoiceclient.cpp @@ -849,7 +849,7 @@ void discord_voice_client::write_ready() std::lock_guard lock(this->stream_mutex); if (!this->paused && outbuf.size()) { type = send_audio_type; - if (outbuf[0].packet.size() == 2 && (*((uint16_t*)(outbuf[0].packet.data()))) == AUDIO_TRACK_MARKER) { + if (outbuf[0].packet.size() == sizeof(uint16_t) && (*((uint16_t*)(outbuf[0].packet.data()))) == AUDIO_TRACK_MARKER) { outbuf.erase(outbuf.begin()); track_marker_found = true; if (tracks > 0) {