diff --git a/src/libsysprof-capture/sysprof-capture-writer.c b/src/libsysprof-capture/sysprof-capture-writer.c index 4b703d3d..ea9e0538 100644 --- a/src/libsysprof-capture/sysprof-capture-writer.c +++ b/src/libsysprof-capture/sysprof-capture-writer.c @@ -613,6 +613,8 @@ sysprof_capture_writer_add_map (SysprofCaptureWriter *self, _sysprof_strlcpy (ev->filename, filename, len - sizeof *ev); ev->filename[len - sizeof *ev - 1] = '\0'; + ((char*)ev)[len-1] = 0; + self->stat.frame_count[SYSPROF_CAPTURE_FRAME_MAP]++; return true;