diff options
Diffstat (limited to 'src/rccstring.c')
-rw-r--r-- | src/rccstring.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rccstring.c b/src/rccstring.c index d520693..bd5ef15 100644 --- a/src/rccstring.c +++ b/src/rccstring.c @@ -80,10 +80,9 @@ size_t rccStringSizedCheck(const char *str, size_t len) { newlen = STRNLEN(str, len); if (newlen>sizeof(rcc_string_header)) { - if ((len==newlen)&&(str[newlen-1])) return 0; + if ((len==newlen)&&(!str[newlen-2])) return 0; newlen-=sizeof(rcc_string_header); } else return 0; - if (((rcc_string_header*)str)->magic == RCC_STRING_MAGIC) return newlen; return 0; } |