NPE fix and reset position on every command

This commit is contained in:
Maik Merten committed 2014-08-09 15:13:59 +02:00
1 parent 3a40d35fdf
commit 7cb4e1c945
1 file changed
+2 -1
@@ -54,7 +54,7 @@ public class SdController extends Device {
private int lba0,lba1,lba2;
private int command;
private int position;
private Status status;
private Status status = Status.IDLE;
public SdController(int address) throws MemoryRangeException {
@@ -161,6 +161,7 @@ public class SdController extends Device {
default:
this.status = Status.IDLE;
}
computePosition();
}
@Override