mirror of
https://github.com/sanni/cartreader.git
synced 2024-11-23 21:19:16 +01:00
Fix crash
This commit is contained in:
parent
b5bff8c1f0
commit
5012ca88ac
@ -460,7 +460,10 @@ void setCart_COL() {
|
||||
else if (b == 2) {
|
||||
for (byte count_newline = 0; count_newline < 7; count_newline++) {
|
||||
while (1) {
|
||||
if (myFile.peek() == '\n') {
|
||||
if (myFile.curPosition() == 0) {
|
||||
break;
|
||||
}
|
||||
else if (myFile.peek() == '\n') {
|
||||
myFile.seekSet(myFile.curPosition() - 1);
|
||||
break;
|
||||
}
|
||||
@ -469,6 +472,7 @@ void setCart_COL() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (myFile.curPosition() != 0)
|
||||
myFile.seekSet(myFile.curPosition() + 2);
|
||||
break;
|
||||
}
|
||||
|
@ -859,7 +859,10 @@ void setCart_INTV() {
|
||||
else if (b == 2) {
|
||||
for (byte count_newline = 0; count_newline < 7; count_newline++) {
|
||||
while (1) {
|
||||
if (myFile.peek() == '\n') {
|
||||
if (myFile.curPosition() == 0) {
|
||||
break;
|
||||
}
|
||||
else if (myFile.peek() == '\n') {
|
||||
myFile.seekSet(myFile.curPosition() - 1);
|
||||
break;
|
||||
}
|
||||
@ -868,6 +871,7 @@ void setCart_INTV() {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (myFile.curPosition() != 0)
|
||||
myFile.seekSet(myFile.curPosition() + 2);
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user