summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--01_exercise/bootloader.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/01_exercise/bootloader.c b/01_exercise/bootloader.c
index fe2d829..08adb1c 100644
--- a/01_exercise/bootloader.c
+++ b/01_exercise/bootloader.c
@@ -19,9 +19,10 @@ void put(char c) {
char WRITE_STRING = 0x13;
-void print(char const * const str) {
- for(int i = 0; str[i] != '\0'; ++i ) {
- put(str[i]);
+void print(char const * str) {
+ while(*str != '\0') {
+ put(*str);
+ ++str;
}
}