@@ -528,7 +528,8 @@ class RedisWrapper<RedisInstance, K, V,
528
528
const std::vector<std::size_t > *sizes_i) {
529
529
assert (strcmp (ptrs_i->front (), " HMGET" ) == 0 );
530
530
assert (sizes_i->front () == 5 );
531
- assert (std::string (hkey.data ()).compare (ptrs_i[1 ]) == 0 );
531
+ assert (std::string (hkey.data (), hkey.size ())
532
+ .compare (0 , sizes_i->at (1 ), ptrs_i->at (1 )) == 0 );
532
533
533
534
connection.send (static_cast <int >(ptrs_i->size ()),
534
535
const_cast <const char **>(ptrs_i->data ()),
@@ -986,7 +987,8 @@ every bucket has its own BucketContext for sending data---for locating reply-
986
987
const std::vector<std::size_t > *sizes_i) {
987
988
assert (strcmp (ptrs_i->front (), " HMGET" ) == 0 );
988
989
assert (sizes_i->front () == 5 );
989
- assert (std::string (hkey.data ()).compare (ptrs_i[1 ]) == 0 );
990
+ assert (std::string (hkey.data (), hkey.size ())
991
+ .compare (0 , sizes_i->at (1 ), ptrs_i->at (1 )) == 0 );
990
992
991
993
connection.send (static_cast <int >(ptrs_i->size ()),
992
994
const_cast <const char **>(ptrs_i->data ()),
@@ -1201,7 +1203,8 @@ every bucket has its own BucketContext for sending data---for locating reply-
1201
1203
const std::vector<std::size_t > *sizes_i) {
1202
1204
assert (strcmp (ptrs_i->front (), " HMSET" ) == 0 );
1203
1205
assert (sizes_i->front () == 5 );
1204
- assert (std::string (hkey.data ()).compare (ptrs_i[1 ]) == 0 );
1206
+ assert (std::string (hkey.data (), hkey.size ())
1207
+ .compare (0 , sizes_i->at (1 ), ptrs_i->at (1 )) == 0 );
1205
1208
1206
1209
connection.send (static_cast <int >(ptrs_i->size ()),
1207
1210
const_cast <const char **>(ptrs_i->data ()),
@@ -1298,7 +1301,8 @@ every bucket has its own BucketContext for sending data---for locating reply-
1298
1301
const std::vector<std::size_t > *sizes_i) {
1299
1302
assert (strcmp (ptrs_i->front (), " HMACCUM" ) == 0 );
1300
1303
assert (sizes_i->front () == redis_command_byte);
1301
- assert (std::string (hkey.data ()).compare (ptrs_i[1 ]) == 0 );
1304
+ assert (std::string (hkey.data (), hkey.size ())
1305
+ .compare (0 , sizes_i->at (1 ), ptrs_i->at (1 )) == 0 );
1302
1306
1303
1307
connection.send (static_cast <int >(ptrs_i->size ()),
1304
1308
const_cast <const char **>(ptrs_i->data ()),
@@ -1377,7 +1381,8 @@ every bucket has its own BucketContext for sending data---for locating reply-
1377
1381
const std::vector<std::size_t > *sizes_i) {
1378
1382
assert (strcmp (ptrs_i->front (), " HDEL" ) == 0 );
1379
1383
assert (sizes_i->front () == 4 );
1380
- assert (std::string (hkey.data ()).compare (ptrs_i[1 ]) == 0 );
1384
+ assert (std::string (hkey.data (), hkey.size ())
1385
+ .compare (0 , sizes_i->at (1 ), ptrs_i->at (1 )) == 0 );
1381
1386
1382
1387
connection.send (static_cast <int >(ptrs_i->size ()),
1383
1388
const_cast <const char **>(ptrs_i->data ()),
0 commit comments