- deleted = zzlDeleteRangeByRank(zobj,start+1,end+1);
- } else if (zobj->encoding == REDIS_ENCODING_RAW) {
+ zobj->ptr = zzlDeleteRangeByRank(zobj->ptr,start+1,end+1,&deleted);
+ if (zzlLength(zobj->ptr) == 0) dbDelete(c->db,key);
+ } else if (zobj->encoding == REDIS_ENCODING_SKIPLIST) {