Skip to content

Commit 3cf10b4

Browse files
committed
OTA: fix sprintf warning
1 parent beedce2 commit 3cf10b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ota/interface/OTAInterfaceDefault.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::requestOta(OtaF
161161
if((mode & ChunkDownload) == ChunkDownload) {
162162
char range[128] = {0};
163163
size_t rangeSize = context->downloadedSize + maxChunkSize > context->contentLength ? context->contentLength - context->downloadedSize : maxChunkSize;
164-
sprintf(range, "bytes=%d-%d", context->downloadedSize, context->downloadedSize + rangeSize);
164+
sprintf(range, "bytes=%lu-%lu", context->downloadedSize, context->downloadedSize + rangeSize);
165165
DEBUG_VERBOSE("OTA downloading range: %s", range);
166166
http_client->sendHeader("Range", range);
167167
}

0 commit comments

Comments
 (0)