chiark / gitweb /
bus: fix rewind logic
authorLennart Poettering <lennart@poettering.net>
Thu, 12 Dec 2013 19:43:37 +0000 (20:43 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 12 Dec 2013 19:49:32 +0000 (20:49 +0100)
src/libsystemd-bus/bus-message.c

index a86cd9a..8d449c5 100644 (file)
@@ -4152,7 +4152,7 @@ _public_ int sd_bus_message_rewind(sd_bus_message *m, int complete) {
         }
 
         c->offset_index = 0;
-        c->item_size = c->n_offsets > 0 ? c->offsets[0] : c->end;
+        c->item_size = (c->n_offsets > 0 ? c->offsets[0] : c->end) - c->begin;
 
         return !isempty(c->signature);
 }