Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 8916bc4

Browse files
committed
Change sprintf %zu to %lu in getFileBlock
This fixes sparkfun#38 When used with ARM GCC Toolchain supplied with Arduino_STM32 newlib nano version is built without C99 formats support, so the %zu format specifier doesn't work, and instead of putting the number it puts "zu" into the resulting string
1 parent d35bce3 commit 8916bc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5601,7 +5601,7 @@ SARA_R5_error_t SARA_R5::getFileBlock(const String& filename, char* buffer, size
56015601

56025602
size_t cmd_len = filename.length() + 32;
56035603
char* cmd = sara_r5_calloc_char(cmd_len);
5604-
sprintf(cmd, "at+urdblock=\"%s\",%zu,%zu\r\n", filename.c_str(), offset, requested_length);
5604+
sprintf(cmd, "at+urdblock=\"%s\",%lu,%lu\r\n", filename.c_str(), offset, requested_length);
56055605
sendCommand(cmd, false);
56065606

56075607
int ich;

0 commit comments

Comments
 (0)