mirror of
https://github.com/Genymobile/scrcpy
synced 2024-12-11 01:34:37 +00:00
Fix memset() size in tests
The memset() size was 1 byte too long. It was harmless because the last 'a' was overwritten by '\0`.
This commit is contained in:
parent
65fbec9643
commit
94702a4309
@ -54,7 +54,7 @@ static void test_serialize_inject_text_long(void) {
|
||||
struct control_msg msg;
|
||||
msg.type = CONTROL_MSG_TYPE_INJECT_TEXT;
|
||||
char text[CONTROL_MSG_INJECT_TEXT_MAX_LENGTH + 1];
|
||||
memset(text, 'a', sizeof(text));
|
||||
memset(text, 'a', CONTROL_MSG_INJECT_TEXT_MAX_LENGTH);
|
||||
text[CONTROL_MSG_INJECT_TEXT_MAX_LENGTH] = '\0';
|
||||
msg.inject_text.text = text;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user