Skip to content

Commit

Permalink
Compliance to Arduino build CI workflow pipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Apr 11, 2024
1 parent 638750b commit 1c8cb1c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/rishka_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ inline double rishka_long_to_double(int64_t l) {
* @param path The file path to sanitize.
* @return A String containing the sanitized file path.
*/
inline String rishka_sanitize_path(char* currentWorkingDirectory, char* path) {
String fullPath = String(currentWorkingDirectory) + "/" + String(path);
inline String rishka_sanitize_path(String currentWorkingDirectory, char* path) {
String fullPath = currentWorkingDirectory + "/" + String(path);
String segment, sanitizedPath = "";

int index;
Expand Down
4 changes: 2 additions & 2 deletions src/rishka_vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1012,10 +1012,10 @@ uint64_t RishkaVM::handleSyscall(uint64_t code) {
}

void RishkaVM::setWorkingDirectory(String directory) {
this->workingDirectory = directory.c_str();
this->workingDirectory = directory;
}

char* RishkaVM::getWorkingDirectory() {
String RishkaVM::getWorkingDirectory() {
return this->workingDirectory;
}

Expand Down
4 changes: 2 additions & 2 deletions src/rishka_vm.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class RishkaVM final {

int64_t pc; ///< Program counter
fabgl::Terminal* terminal; ///< Terminal for input/output operations
char* workingDirectory; ///< Current directory of the virtual machine
String workingDirectory; ///< Current directory of the virtual machine

bool running; ///< Flag indicating whether the VM is running
int64_t exitCode; ///< Exit code of the VM after execution
Expand Down Expand Up @@ -261,7 +261,7 @@ class RishkaVM final {
*
* @return A pointer to the current working directory string.
*/
char* getWorkingDirectory();
String getWorkingDirectory();

/**
* @brief Template function to retrieve a parameter from the registers.
Expand Down

0 comments on commit 1c8cb1c

Please sign in to comment.