summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/arch/arduino-nano/driver/stdin.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/arch/arduino-nano/driver/stdin.h b/include/arch/arduino-nano/driver/stdin.h
index 1085111..1f83c11 100644
--- a/include/arch/arduino-nano/driver/stdin.h
+++ b/include/arch/arduino-nano/driver/stdin.h
@@ -19,8 +19,8 @@ class StandardInput {
char getKey();
inline void addKey(char key) {
- buffer[write_pos++] = key;
- write_pos %= 8;
+ buffer[write_pos] = key;
+ write_pos = (write_pos + 1) % 8;
}
};