Skip to content

Commit 71827b7

Browse files
committed
Update sprintf %lu in getFileBlock
After more testing, kept only casting from size_t to unsigned long (compatible with 32-bit MCUs)
1 parent a2a7a13 commit 71827b7

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -5608,11 +5608,7 @@ SARA_R5_error_t SARA_R5::getFileBlock(const String& filename, char* buffer, size
56085608
{
56095609
return SARA_R5_ERROR_OUT_OF_MEMORY;
56105610
}
5611-
#ifdef ULLONG_MAX
5612-
sprintf(command, "%s=\"%s\",%llu,%llu", SARA_R5_FILE_SYSTEM_READ_BLOCK, filename.c_str(), (unsigned long long) offset, (unsigned long long) requestedLength);
5613-
#else
56145611
sprintf(command, "%s=\"%s\",%lu,%lu", SARA_R5_FILE_SYSTEM_READ_BLOCK, filename.c_str(), (unsigned long) offset, (unsigned long) requestedLength);
5615-
#endif
56165612

56175613
response = sara_r5_calloc_char(minimumResponseAllocation);
56185614
if (response == nullptr)

0 commit comments

Comments
 (0)