diff options
| author | Roy Hooper <rhooper@toybox.ca> | 2019-10-03 19:06:55 -0400 |
|---|---|---|
| committer | Roy Hooper <rhooper@toybox.ca> | 2019-10-03 19:06:55 -0400 |
| commit | 10510014952e1ecede35325324231d8aca6b0baa (patch) | |
| tree | c9af6e58997e0b30205f387cf1bc7814ce67cef3 /lib | |
| parent | 3cf9a475b99090d72b9992816808cbde309dcc40 (diff) | |
| parent | f4922a530a06ed62523ae333eab90fee6145fc46 (diff) | |
Merge branch 'master' into new-pixelbuf-api
Diffstat (limited to 'lib')
| m--------- | lib/tinyusb | 0 | ||||
| -rw-r--r-- | lib/utils/buffer_helper.c | 4 | ||||
| -rw-r--r-- | lib/utils/buffer_helper.h | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/lib/tinyusb b/lib/tinyusb -Subproject 0848c462b3e431a9da42e96537d2b597a457963 +Subproject d3e48da5a1266a88f5f0fdfe28818c8599b0984 diff --git a/lib/utils/buffer_helper.c b/lib/utils/buffer_helper.c index f6eb8bf1e..694952e3d 100644 --- a/lib/utils/buffer_helper.c +++ b/lib/utils/buffer_helper.c @@ -26,10 +26,10 @@ #include "lib/utils/buffer_helper.h" -void normalize_buffer_bounds(int32_t* start, int32_t end, uint32_t* length) { +void normalize_buffer_bounds(int32_t* start, int32_t end, size_t* length) { if (end < 0) { end += *length; - } else if (((uint32_t) end) > *length) { + } else if (((size_t) end) > *length) { end = *length; } if (*start < 0) { diff --git a/lib/utils/buffer_helper.h b/lib/utils/buffer_helper.h index 47042e7ef..7487b9df5 100644 --- a/lib/utils/buffer_helper.h +++ b/lib/utils/buffer_helper.h @@ -28,7 +28,8 @@ #define MICROPY_INCLUDED_LIB_UTILS_BUFFER_HELPER_H #include <stdint.h> +#include <string.h> -void normalize_buffer_bounds(int32_t* start, int32_t end, uint32_t* length); +void normalize_buffer_bounds(int32_t* start, int32_t end, size_t* length); #endif // MICROPY_INCLUDED_LIB_UTILS_BUFFER_HELPER_H |
