diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-14 19:39:08 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-14 19:39:08 +0000 |
commit | 7a6b6a56dabe1e62a0fbc6222c090aa077bcadc7 (patch) | |
tree | 1b509a460c238dc6a69c82930a9f726ee0a969e0 /src/rccstring.c | |
parent | 3e5322512be81527430059b901747df7692a6855 (diff) | |
download | librcc-7a6b6a56dabe1e62a0fbc6222c090aa077bcadc7.tar.gz librcc-7a6b6a56dabe1e62a0fbc6222c090aa077bcadc7.tar.bz2 librcc-7a6b6a56dabe1e62a0fbc6222c090aa077bcadc7.tar.xz librcc-7a6b6a56dabe1e62a0fbc6222c090aa077bcadc7.zip |
Example
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; } |