diff --git a/include/ucore/string.h b/include/ucore/string.h index eb5e3ee..4225a2a 100644 --- a/include/ucore/string.h +++ b/include/ucore/string.h @@ -36,7 +36,7 @@ uint8_t* uc_hex_decode(const char *in, size_t maxlen,uint8_t *out); /** As uc_hex_encode , but inserts the @delim string between each converted * byte (each 2 hex chars) */ -char* uc_hex_encode_delim(const uint8_t *in, size_t inlen, char *out, int outlen, char *delim); +char* uc_hex_encode_delim(const uint8_t *in, size_t inlen, char *out, int outlen, const char *delim); /** * Convert the string to lowercase, calls tolower() on each char. diff --git a/src/hex.c b/src/hex.c index e361856..b2a162d 100644 --- a/src/hex.c +++ b/src/hex.c @@ -28,14 +28,14 @@ uc_hex_encode(const uint8_t *in, size_t len, char *out) } char* -uc_hex_encode_delim(const uint8_t *in, size_t inlen, char *out, int outlen, char *delim) +uc_hex_encode_delim(const uint8_t *in, size_t inlen, char *out, int outlen, const char *delim) { size_t i; char *outp = out; for (i = 0; i < inlen; i++) { unsigned int hn, ln; - char *delimp = delim; + const char *delimp = delim; /** Truncate at a full byte */ if (outlen <= 2) {