diff --git a/src/input/input_buffer.cpp b/src/input/input_buffer.cpp index 0f6872ee..62075c90 100644 --- a/src/input/input_buffer.cpp +++ b/src/input/input_buffer.cpp @@ -240,7 +240,7 @@ namespace Mist { //Find page in indexpage and null it for (int i = 0; i < 8192; i += 8){ unsigned int thisKeyNum = ((((long long int *)(metaPages[tid].mapped + i))[0]) >> 32) & 0xFFFFFFFF; - if (thisKeyNum == htonl(pagesByTrack[tid].begin()->first) && ((((long long int *)(metaPages[tid].mapped + i))[0]) != 0)){ + if (thisKeyNum == htonl(bufferLocations[tid].begin()->first) && ((((long long int *)(metaPages[tid].mapped + i))[0]) != 0)){ (((long long int *)(metaPages[tid].mapped + i))[0]) = 0; } } diff --git a/src/io.cpp b/src/io.cpp index a881a8d4..1902c0be 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -178,7 +178,7 @@ namespace Mist { } unsigned long mapTid = trackMap[tid]; if (!pagesByTrack.count(tid)){ - //The buffer does not control the datapages, indicated by no pagesByTrack entry. + // If there is no pagesByTrack entry, the pages are managed in local code and not through io.cpp (e.g.: MistInBuffer) return; } //If the given pagenumber is not a valid page on this track, do nothing