From 904f867bdc46500082658947a669c5bb61bfba11 Mon Sep 17 00:00:00 2001 From: Casper Meijn Date: Tue, 19 Apr 2022 21:44:17 +0200 Subject: [PATCH] semihosting: Fix typo in semihost_rename Fix typo in semihost_rename. Now it actually sends the `new_name` as well as the `old_name`. --- platform/source/mbed_semihost_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/source/mbed_semihost_api.c b/platform/source/mbed_semihost_api.c index 2ee681b938..7e059b44d6 100644 --- a/platform/source/mbed_semihost_api.c +++ b/platform/source/mbed_semihost_api.c @@ -121,8 +121,8 @@ int semihost_rename(const char *old_name, const char *new_name) uint32_t args[4]; args[0] = (uint32_t)old_name; args[1] = (uint32_t)strlen(old_name); - args[0] = (uint32_t)new_name; - args[1] = (uint32_t)strlen(new_name); + args[2] = (uint32_t)new_name; + args[3] = (uint32_t)strlen(new_name); return __semihost(SYS_RENAME, args); } #endif