diff options
| author | 2025-09-25 16:56:13 +0800 | |
|---|---|---|
| committer | 2025-09-25 16:56:13 +0800 | |
| commit | 46f2a35f0ddeea59dc5f8d446c58afe5ef7a9dbe (patch) | |
| tree | 2389cc3c9f2a635b94c6897db0c14ce009f4765e | |
| parent | 23f201d13f2fad05f5096e254e104bcaf35fd607 (diff) | |
| download | libirecovery-46f2a35f0ddeea59dc5f8d446c58afe5ef7a9dbe.tar.gz libirecovery-46f2a35f0ddeea59dc5f8d446c58afe5ef7a9dbe.tar.bz2 | |
Fix: array initialization compatibility with MSVC
| -rw-r--r-- | src/libirecovery.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index 8c2c518..7993246 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -3269,7 +3269,7 @@ static irecv_error_t irecv_send_command_raw(irecv_client_t client, const char* c | |||
| 3269 | if ((error = irecv_usb_interrupt_transfer(client, 0x83, &buf[0], sizeof(buf), &bytes, USB_TIMEOUT))) return error; | 3269 | if ((error = irecv_usb_interrupt_transfer(client, 0x83, &buf[0], sizeof(buf), &bytes, USB_TIMEOUT))) return error; |
| 3270 | if (bytes != sizeof(legacyCMD)) return IRECV_E_UNKNOWN_ERROR; | 3270 | if (bytes != sizeof(legacyCMD)) return IRECV_E_UNKNOWN_ERROR; |
| 3271 | #endif | 3271 | #endif |
| 3272 | char cmdstr[0x100] = {}; | 3272 | char cmdstr[0x100] = {0}; |
| 3273 | if (length & 0xf) { | 3273 | if (length & 0xf) { |
| 3274 | length &= ~0xf; | 3274 | length &= ~0xf; |
| 3275 | length += 0x10; | 3275 | length += 0x10; |
| @@ -3730,7 +3730,7 @@ irecv_error_t irecv_send_buffer(irecv_client_t client, unsigned char* buffer, un | |||
| 3730 | 3730 | ||
| 3731 | if (legacy_recovery_mode) { | 3731 | if (legacy_recovery_mode) { |
| 3732 | irecv_reconnect(client, 0); | 3732 | irecv_reconnect(client, 0); |
| 3733 | char cmdstr[0x100] = {}; | 3733 | char cmdstr[0x100] = {0}; |
| 3734 | snprintf(cmdstr, sizeof(cmdstr), "setenv filesize %d", (int)length); | 3734 | snprintf(cmdstr, sizeof(cmdstr), "setenv filesize %d", (int)length); |
| 3735 | irecv_send_command(client, cmdstr); | 3735 | irecv_send_command(client, cmdstr); |
| 3736 | } | 3736 | } |
