1
1
mirror of synced 2025-02-07 14:31:26 +01:00

Update qr.cpp

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

View File

@ -166,6 +166,9 @@ HOOK_DYNAMIC (i64, __fastcall, copy_data, i64, void *dest, int length) {
int buf_len = ((GetQrEvent*) getQrEvent) (length, plugin_data);
if (0 < buf_len && buf_len <= length) {
memcpy (dest, plugin_data, buf_len);
} else {
std::cerr << "QR discard! Length invalid: " << buf_len << ", valid range: 0~" << length
<< std::endl;
}
gState = State::Ready;
return buf_len;