Skip to content

Commit 03a0396

Browse files
Laurence BankLaurence Bank
authored andcommitted
Fixed memory corruption when rotated 180
1 parent d7258f8 commit 03a0396

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/obd.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4236,7 +4236,7 @@ int iLines;
42364236
if (pOBD->iOrientation == 0 || (pOBD->iOrientation == 180 && pOBD->can_flip)) {
42374237
for (y=0; y<iLines; y++) {
42384238
obdSetPosition(pOBD, 0, y*8, 1);
4239-
obdWriteDataBlock(pOBD, pBuffer, pOBD->width, 1);
4239+
RawWriteData(pOBD, pBuffer, pOBD->width);
42404240
pBuffer += pOBD->width;
42414241
}
42424242
} else { // have to manually do 180 flipped
@@ -4245,7 +4245,7 @@ int iLines;
42454245
for (int x=0; x<pOBD->width; x++) {
42464246
u8Cache[pOBD->width-1-x] = ucMirror[pBuffer[x]];
42474247
}
4248-
obdWriteDataBlock(pOBD, u8Cache, pOBD->width, 1);
4248+
RawWriteData(pOBD, u8Cache, pOBD->width);
42494249
pBuffer += pOBD->width;
42504250
}
42514251
}

0 commit comments

Comments
 (0)