diff options
| author | Amlal <amlalelmahrouss@icloud.com> | 2024-07-28 16:11:46 +0000 |
|---|---|---|
| committer | Amlal <amlalelmahrouss@icloud.com> | 2024-07-28 16:11:46 +0000 |
| commit | c4023005e029ae092dad2689564c490580dd5c28 (patch) | |
| tree | 3080ba07a6b552bf3d7591574cf69b2a3c8fd0fd /Kernel/Sources/Utils.cxx | |
| parent | 8c8822fff78f9ff9cd640271da9b3634c4c2f97f (diff) | |
| parent | 4db57a2d646b1538783a0675b38bada7a0f903ae (diff) | |
Merged in MHR-36 (pull request #17)
MHR-36
Diffstat (limited to 'Kernel/Sources/Utils.cxx')
| -rw-r--r-- | Kernel/Sources/Utils.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Kernel/Sources/Utils.cxx b/Kernel/Sources/Utils.cxx index 37269ca1..eeac3f93 100644 --- a/Kernel/Sources/Utils.cxx +++ b/Kernel/Sources/Utils.cxx @@ -1,6 +1,6 @@ /* ------------------------------------------- - Copyright Zeta Electronics Corporation + Copyright ZKA Technologies ------------------------------------------- */ @@ -37,7 +37,7 @@ namespace Kernel { if (len > _len) { - break; + return 0; } ++len; @@ -48,15 +48,14 @@ namespace Kernel Size rt_string_len(const Char* ptr) { - if (!ptr) + if (*ptr == 0) return 0; SizeT cnt = 0; - while (*ptr != (Char)0) + while (ptr[cnt] != (Char)0) { - ++ptr; - ++cnt; + cnt++; } return cnt; |
