diff options
author | Tom Rini <trini@konsulko.com> | 2024-01-17 09:12:27 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-01-17 09:12:27 -0500 |
commit | 106332d6cc583c4339e07020989d09b567900a59 (patch) | |
tree | 746beb976633e80b5c824805100490bb51cb9ffb /common/command.c | |
parent | 043ca8c8a9b181cf6f17441e9b89b5ee33206309 (diff) | |
parent | a300ac3851440906a3934915bd12db2b96987a6a (diff) |
Merge branch '2024-01-16-assorted-updates-and-improvements'
- Add more pytests to exercise functionality on real hardware, cleanup
and add tests around "cp"/memmove, add phyCORE-AM62x and Phytium
Pe2201 platforms, Nuvoton NPCM BMC reset driver and improve QEMU
SMBIOS support
Diffstat (limited to 'common/command.c')
-rw-r--r-- | common/command.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/command.c b/common/command.c index 7821c273dae..af8ffdba8f8 100644 --- a/common/command.c +++ b/common/command.c @@ -465,12 +465,12 @@ int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp) #endif #ifdef CMD_DATA_SIZE -int cmd_get_data_size(char* arg, int default_size) +int cmd_get_data_size(const char *arg, int default_size) { /* Check for a size specification .b, .w or .l. */ int len = strlen(arg); - if (len > 2 && arg[len-2] == '.') { + if (len >= 2 && arg[len-2] == '.') { switch (arg[len-1]) { case 'b': return 1; |