1
0

Fix input

This commit is contained in:
otya128
2016-12-11 18:48:52 +09:00
parent a0e414a46c
commit e7375481f3

View File

@@ -1174,6 +1174,10 @@ class PetitComputer
} }
void left() void left()
{ {
if (pos == 0)
{
return;
}
pos--; pos--;
if (console.CSRX == 0) if (console.CSRX == 0)
{ {
@@ -1185,6 +1189,10 @@ class PetitComputer
} }
void right() void right()
{ {
if (pos >= buffer.length)
{
return;
}
pos++; pos++;
console.CSRX++; console.CSRX++;
if (console.CSRX == console.consoleWidthC) if (console.CSRX == console.consoleWidthC)