--- libmemcached/string.cc.orig 2013-05-13 17:14:22.383125200 +0200 +++ libmemcached/string.cc 2013-05-13 17:14:50.776468746 +0200 @@ -285,7 +285,7 @@ { assert_msg(self, "Invalid memcached_string_st"); // If we fail at adding the null, we copy and move on - if (memcached_success(memcached_string_append_null(self))) + if (memcached_failed(memcached_string_append_null(self))) { return memcached_string_c_copy(self); }