From 7a6b6a56dabe1e62a0fbc6222c090aa077bcadc7 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 14 Jul 2005 19:39:08 +0000 Subject: Example --- src/rccstring.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/rccstring.c') 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; } -- cgit v1.2.3