Fixing type bugs

This commit is contained in:
Krzosa Karol
2022-10-04 20:03:37 +02:00
parent fb3226a059
commit ed0b32eb3e
3 changed files with 19 additions and 25 deletions

View File

@@ -13,7 +13,6 @@ AnyArguments :: (values: []Any)
* Written by Lukás Chmela
* Released under GPLv3.
*/
ItoaLookupTable := "zyxwvutsrqponmlkjihgfedcba9876543210123456789abcdefghijklmnopqrstuvwxyz"
Itoa :: (value: S64, result: *U8, base: S64): *U8
// check that the base if valid
if (base < 2) || (base > 36)
@@ -31,7 +30,7 @@ Itoa :: (value: S64, result: *U8, base: S64): *U8
// @todo: FIX FIX FIX String is untyped
*ptr++ = ItoaLookupTable[35 + (tmp_value - value * base)]
*ptr++ = "zyxwvutsrqponmlkjihgfedcba9876543210123456789abcdefghijklmnopqrstuvwxyz"[35 + (tmp_value - value * base)]
// Apply negative sign
if tmp_value < 0