summaryrefslogtreecommitdiffstats
path: root/src/rccstring.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-14 19:39:08 +0000
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2005-07-14 19:39:08 +0000
commit7a6b6a56dabe1e62a0fbc6222c090aa077bcadc7 (patch)
tree1b509a460c238dc6a69c82930a9f726ee0a969e0 /src/rccstring.c
parent3e5322512be81527430059b901747df7692a6855 (diff)
downloadlibrcc-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.c3
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;
}