summaryrefslogtreecommitdiff
path: root/tnslc/utils
diff options
context:
space:
mode:
authorKai Gunger <kgunger12@gmail.com>2026-07-18 18:32:51 -0400
committerKai Gunger <kgunger12@gmail.com>2026-07-18 18:32:51 -0400
commit1cbb15bc02562b77c6bb69c174cc08f5be76eea4 (patch)
tree74db0e40149739a9b1533644053727b700d1373f /tnslc/utils
parent9a216e4f48eb0e8738e4e85b33407c179ca1e37f (diff)
[tnslc] fix conversion funcorigin
Diffstat (limited to 'tnslc/utils')
-rw-r--r--tnslc/utils/algo.tnsl8
1 files changed, 4 insertions, 4 deletions
diff --git a/tnslc/utils/algo.tnsl b/tnslc/utils/algo.tnsl
index 4f3c6b2..31d9290 100644
--- a/tnslc/utils/algo.tnsl
+++ b/tnslc/utils/algo.tnsl
@@ -1,5 +1,5 @@
-/; strcmp(~uint8 a, b) [bool]
+/; strcmp (~uint8 a, b) [bool]
/; loop (a` == b` && a` !== 0 && b` !== 0) [a++; b++] ;/
/; if (b` == 0 && a` == 0)
@@ -9,7 +9,7 @@
;/
# Length of a cstr
-/; strlen(~uint8 str) [int]
+/; strlen (~uint8 str) [int]
int out = 0
/; loop (str` !== 0) [str++; out++] ;/
return out
@@ -64,9 +64,9 @@
/; if (ch !< '0' && ch !> '9')
return ch - '0'
;; else if (ch !< 'a' && ch !> 'f')
- return ch - 'a'
+ return ch - 'a' + 10
;; else if (ch !< 'A' && ch !> 'F')
- return ch - 'A'
+ return ch - 'A' + 10
;/
return 0
;/