Skip to content

Commit 3e4609c

Browse files
committed
Fixed a bug in readRowsBetween (curOutput was already SPIFFSLogData<T>* so didn't need the sizeof())
1 parent c84e855 commit 3e4609c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SPIFFSLogger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ size_t SPIFFSLogger<T>::readRowsBetween(SPIFFSLogData<T> *output, time_t fromTim
166166
hits++;
167167
if (hits > startIdx)
168168
{
169-
SPIFFSLogData<T> *curOutput = output + (copied * sizeof(SPIFFSLogData<T>));
169+
SPIFFSLogData<T> *curOutput = output + copied;
170170

171171
// copy the timestamp
172172
memcpy(curOutput, &currentTime, sizeof(time_t));

0 commit comments

Comments
 (0)