diff options
Diffstat (limited to 'memrchr.c')
-rw-r--r-- | memrchr.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -19,8 +19,8 @@ libsimple_memrchr(const void *s_, int c, size_t n_) int main(void) { - assert(!strcmp(libsimple_memrchr("1234512345", '3', sizeof("1234512345") - 1), "345")); - assert(!strcmp(libsimple_memrchr("1234512345", '5', sizeof("1234512345") - 1), "5")); + assert(!strcmpnul(libsimple_memrchr("1234512345", '3', sizeof("1234512345") - 1), "345")); + assert(!strcmpnul(libsimple_memrchr("1234512345", '5', sizeof("1234512345") - 1), "5")); assert(!libsimple_memrchr("1234512345", 'x', sizeof("1234512345") - 1)); return 0; } |