From e41535c945bda9a7884b2ea24a5e5b3de9fbfde5 Mon Sep 17 00:00:00 2001 From: nthnn Date: Sun, 14 Apr 2024 21:54:00 +0800 Subject: [PATCH] Fixed default working directory path parameter for RishkaVM::initialize() --- examples/shell_example/shell_example.ino | 2 +- src/rishka_vm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/shell_example/shell_example.ino b/examples/shell_example/shell_example.ino index bb9f551..c0e9eee 100644 --- a/examples/shell_example/shell_example.ino +++ b/examples/shell_example/shell_example.ino @@ -132,7 +132,7 @@ void setup() { // Initialize the Rishka VM instance. vm = new RishkaVM(); - vm->initialize(&Terminal, "/"); + vm->initialize(&Terminal); // Print prompt Terminal.print("\e[32m[\e[97m" + vm->getWorkingDirectory() + "\e[97m\e[32m]~\e[97m "); diff --git a/src/rishka_vm.h b/src/rishka_vm.h index 486531e..343462d 100644 --- a/src/rishka_vm.h +++ b/src/rishka_vm.h @@ -194,7 +194,7 @@ class RishkaVM final { * @param stream A pointer to the Terminal object for input/output operations. * @param directory The path to the new working directory. */ - void initialize(fabgl::Terminal* terminal, String workingDirectory); + void initialize(fabgl::Terminal* terminal, String workingDirectory = "/"); /** * @brief Resets the Rishka virtual machine instance to its initial state.