From 39132c0b3f7c2b5f090a84859cd63a3d67124f0d Mon Sep 17 00:00:00 2001 From: Hugues Delorme Date: Wed, 28 Oct 2015 16:13:23 +0100 Subject: [PATCH] gmio_core/internal: fix strlen in GMIO_CONST_STRING_FROM_ARRAY() --- src/gmio_core/internal/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gmio_core/internal/string.h b/src/gmio_core/internal/string.h index 311afa5..0f3c659 100644 --- a/src/gmio_core/internal/string.h +++ b/src/gmio_core/internal/string.h @@ -39,7 +39,7 @@ typedef struct gmio_const_string gmio_const_string_t; * const gmio_const_string_t token_s = GMIO_CONST_STRING_FROM_ARRAY(token); * \endcode */ -#define GMIO_CONST_STRING_FROM_ARRAY(array) { &(array)[0], sizeof(array) } +#define GMIO_CONST_STRING_FROM_ARRAY(array) { &(array)[0], sizeof(array) - 1 } /*! Stores traditional 8-bit mutable strings *