From: Joseph C. Lehner Date: Mon, 8 Feb 2016 15:05:53 +0000 (+0100) Subject: Fix warning when building on 32-bit OSX X-Git-Tag: v0.9~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=138615e1e813f28348be875e4f23dc10ac98b456;p=oweals%2Fnmrpflash.git Fix warning when building on 32-bit OSX --- diff --git a/tftp.c b/tftp.c index ae5b1a2..c24f8cc 100644 --- a/tftp.c +++ b/tftp.c @@ -60,8 +60,10 @@ static const char *leafname(const char *path) static bool is_netascii(const char *str) { - for (; *str; ++str) { - if (*str < 0x20 || *str > 0x7f) { + uint8_t *p = (uint8_t*)str; + + for (; *p; ++p) { + if (*p < 0x20 || *p > 0x7f) { return false; } }