1
1
mirror of synced 2025-03-03 16:09:46 +01:00

Update qr.cpp

This commit is contained in:
ptmaster 2024-03-28 17:18:58 +08:00 committed by GitHub
parent b084fe5b13
commit bbf7116658
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -164,7 +164,7 @@ HOOK_DYNAMIC (i64, __fastcall, copy_data, i64, void *dest, int length) {
if (getQrEvent) { if (getQrEvent) {
unsigned char plugin_data[length]; unsigned char plugin_data[length];
int buf_len = ((GetQrEvent*) getQrEvent) (length, plugin_data); int buf_len = ((GetQrEvent*) getQrEvent) (length, plugin_data);
if (buf_len > 0) { if (0 < buf_len && buf_len <= length) {
memcpy (dest, plugin_data, buf_len); memcpy (dest, plugin_data, buf_len);
} }
gState = State::Ready; gState = State::Ready;